Skip to content

ode15s

ode · scripts/ode/ode15s.m

: [t, y] = ode15s (fcn, trange, y0)
: [t, y] = ode15s (fcn, trange, y0, ode_opt)
: [t, y, te, ye, ie] = ode15s (…)
: solution = ode15s (…)

Integrate a stiff equation y' = f(t,y), or an index-1 mass-matrix system M(t,y) y' = f(t,y), with a variable-order BDF method (orders 1 to 5). The preferred backend is the SUNDIALS IDA builtin __ode15__; when that is unavailable the pure-M BDF engine used by ode15i is used instead (still stiff-capable, including Mass and Jacobian). Only as a last resort for unit-mass ODEs is ode45 used.

fcn is a function handle or a function name. trange is a strictly monotonic vector of at least two times. y0 is the state at trange(1); a row is accepted. ode_opt comes from odeset. The mass matrix and Jacobian may be constant (dense or sparse) matrices or functions. A single output is a structure with fields solver, extdata, x and y, plus xe, ye and ie when an event function is set.