ordinary differential equation solver, discrete time simulation
y=ode("discrete",y0,k0,kvect,f)
a real vector or matrix (initial conditions).
a real scalar (initial time).
an external i.e. function or character string or list.
an integer (initial time).
an integer vector.
With this syntax (first argument equal to
"discrete"
) ode
computes recursively
y(k+1)=f(k,y(k))
from an initial state
y(k0)
and returns y(k)
for
k
in kvect
.
kvect(1)
must be greater than or equal to
k0
.
Other arguments and other options are the same as for
ode
, see the see ode help.