Professional Documents
Culture Documents
ode45 In general, the ode45 solver is the best to apply as a first try for most problems. For this reason, ode45 is
the default solver for models with continuous states. This Runge-Kutta (4,5) solver is a fifth-order method
that performs a fourth-order estimate of the error. This solver also uses a fourth-order “free” interpolant,
which allows for event location and smoother plots.
The ode45 is more accurate and faster than ode23. If the ode45 is computationally slow, your problem
may be stiff and thus in need of an implicit solver.
ode23 The ode23 can be more efficient than the ode45 solver at crude error tolerances and in the presence of
mild stiffness. This solver provides accurate solutions for “free” by applying a cubic Hermite interpolation
to the values and slopes computed at the ends of a step.
ode113 For problems with stringent error tolerances or for computationally intensive problems, the Adams-
Bashforth-Moulton PECE solver can be more efficient than ode45.
Variable Step Continuous Implicit
Solver
One-Step Multistep Order of Solver Reset
ODE Solver Max. Order Method
Method Method Accuracy Method
ode15s ode15s is based on the numerical differentiation formulas (NDFs).NDFs are more
efficient than the backward differentiation formulas (BDFs), which are also known as
Gear's method. The ode15s solver numerically generates the Jacobian matrices. If you
suspect that a problem is stiff, or if ode45 failed or was highly inefficient, try ode15s. As a
rule, start by limiting the maximum order of the NDFs to 2.
ode23t The ode23t solver is an implementation of the trapezoidal rule using a “free” interpolant.
Use this solver if your model is only moderately stiff and you need a solution without
numerical damping. (Energy is not dissipated when you model oscillatory motion.)