deval
- :
y =deval(sol, xq)¶ - :
y =deval(xq, sol)¶ - :
y =deval(sol, xq, idx)¶ - :
[y, yp] =deval(…)¶ Evaluate an ODE solution structure at the query times xq.
sol is the structure returned by
ode45,ode113and the other initial-value solvers:xholds the mesh and each column ofyis the state at that mesh point. The two-argument form also accepts the arguments in the opposite order. idx selects state components (rows ofsol.y).The interpolant is the cubic Hermite polynomial matching the stored state and, when
sol.idata.ypis present, the stored derivative. Otherwise a cubic spline of the mesh values is used. A second output is the derivative of that interpolant. Query times outside[sol.x(1), sol.x(end)]are an error.