ode workflows
ODE examples and object workflow.
📄Description

The function workflow returns arrays or a solution structure. The object workflow stores the problem in an ode instance and returns a result object from solve.

Workflow Main calls When to use
Function ode45, ode15s, ode15i Compact scripts that return arrays or a solution structure.
Object ode, solve, deval Reusable problem definitions with solver options and result objects.
Post-processing deval, odextend Interpolate or continue a computed solution.

Use a solution structure with deval for interpolation and odextend to continue an integration. Use Events to locate zero crossings, Mass for mass matrix systems, and Jacobian to help stiff solvers.

💡Examples
Function workflow with interpolation.
sol = ode45(@(t,y) -y, [0 1], 1);
yhalf = deval(sol, 0.5)
Object workflow.
problem = ode('ODEFcn', @(t,y) -y, 'InitialValue', 1);
result = solve(problem, 0, 1);
value = deval(result, 0.5)
Refined output and statistics.
options = odeset('Refine', 4, 'Stats', 'on');
[t, y] = ode45(@(t,y) y, [0 1], 1, options)
🔗See Also
odedevalodextendodesetode complex workflow tutorial
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub