ode interpolation extension tutorial
Interpolate and extend ODE solutions.
📄Description

Call a solver with one output to get a solution structure. The structure stores accepted internal steps; array outputs such as [t, y] use requested or refined output points. Use deval to evaluate the solution structure at additional times.

Task Call Notes
Interpolate deval(sol, tq) Evaluation points must stay inside the solution interval.
Get derivatives [y, yp] = deval(sol, tq) Derivative output follows the same column layout as y.
Continue odextend(sol, odefun, tfinal) Builds a new solution structure on the extended interval.

Use odextend to continue an integration from the final state while preserving solution metadata and events.

💡Examples
Evaluate a solution at requested points.
sol = ode45(@(t,y) -y, [0 1], 1);
values = deval(sol, [0 0.25 0.5 1])
Extend a solution.
sol = ode45(@(t,y) -y, [0 0.5], 1);
extended = odextend(sol, @(t,y) -y, 1);
value = deval(extended, 1)
🔗See Also
devalodextendode45
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub