FUNCTION REFERENCE

ode15s

Solve stiff differential equations and DAEs, variable order (NDF/BDF 1 to 5).

Solve stiff differential equations and DAEs, variable order (NDF/BDF 1 to 5).

Syntax

[t, y] = ode15s(@f, tspan, y0)

Syntax

[t, y] = ode15s(@f, tspan, y0, odeset('Jacobian', J, 'Mass', M))

Syntax

[t, y, te, ye, ie] = ode15s(@f, tspan, y0, odeset('Events', @ev))

Syntax

[t, y] = ode15s(@f, tspan, y0, options, p1, p2, ...)

Syntax

sol = ode15s(@f, tspan, y0)

Uses the numerical differentiation formulas of Shampine and Reichelt (1997,

section 2), or backward differentiation formulas with odeset('BDF','on'),

of orders 1 through MaxOrder (at most 5). Backward differences provide error

estimates and polynomial interpolation; quasi-constant steps and order changes

control the error. A simplified Newton iteration reuses a finite-difference or

user Jacobian and its linear-system factors when possible. Mass may be a constant

matrix or a function M(t, y). Constant diagonal singular mass matrices support

index-1 DAEs, with consistent initial values obtained by solving the algebraic

constraints (Shampine, Reichelt and Kierzenka, 1999, sections 3–4).

Stats 'on' prints the six counters.

See odeset for event outputs and extra arguments after options.

Example

[t, y] = ode15s(@(t,y) [-y(1); -1000*y(2)], [0 1], [1; 1]); y(end, 1)   % approximately 0.368

Differences from MATLAB: adaptive steps, order choices, statistics and rounded

solution values can differ. Consistent initial conditions are computed only for

constant diagonal mass matrices. OutputFcn, OutputSel and NonNegative are

supported, except NonNegative with a Mass matrix stops with an error.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.