MATLAB Function Reference | ![]() ![]() |
Evaluate the solution of a differential equation problem
Syntax
sxint = deval(sol,xint) sxint = deval(xint,sol) sxint = deval(sol,xint,idx) sxint = deval(xint,sol,idx)
Description
sxint = deval(sol,xint) and sxint = deval(xint,sol)
evaluate the solution of a differential equation problem. sol
is a structure returned by one of these solvers:
ode45
, ode23
, ode113
, ode15s
, ode23s
, ode23t
, ode23tb
),
dde23
),
bvp4c
).
xint
is a point or a vector of points at which you want the solution. The elements of xint
must be in the interval [sol.x(1),sol.x(end)]
. For each i
, sxint(:,i)
is the solution at xint(i)
.
sxint = deval(sol,xint,idx) and sxint = deval(xint,sol,idx)
evaluate as above but return only the solution components with indices listed in idx
.
Example
This example solves the system using
ode45
, and evaluates and plots the first component of the solution at 100 points in the interval [0,20]
.
See Also
ODE solvers: ode45
, ode23
, ode113
, ode15s
, ode23s
, ode23t
, ode23tb
DDE solver: dde23
BVP solver: bvp4c
![]() | detrend | diag | ![]() |