Ordinary Differential Equations
The Ordinary Differential Equation (ODE) solvers in MATLAB® solve initial value problems with a variety of properties. The solvers can work on stiff or nonstiff problems, problems with a mass matrix, differential algebraic equations (DAEs), or fully implicit problems. For more information, see Choose an ODE Solver.
Solve problems and set options using a visual interface with the Solve ODE Live Editor task.
Objects
ode | Ordinary differential equations (Since R2023b) |
odeMassMatrix | ODE mass matrix (Since R2023b) |
odeJacobian | ODE Jacobian matrix (Since R2023b) |
odeEvent | ODE event definition (Since R2023b) |
odeSensitivity | ODE sensitivity analysis (Since R2024a) |
odeDelay | ODE delay definition (Since R2025a) |
ODEResults | Results of ODE integration (Since R2023b) |
Live Editor Tasks
| Solve ODE | Solve system of ordinary differential equations in the Live Editor (Since R2024b) |
Functions
Topics
Solving ODEs
- Choose an ODE Solver
ODE background information, solver descriptions, algorithms, and example summary. - Summary of ODE Options
Usage ofodesetand table indicating which options work with each ODE solver. - ODE Event Location
Detect events during solution of ODE. - Solve Nonstiff ODEs
This page contains two examples of solving nonstiff ordinary differential equations usingode45. - Solve Stiff ODEs
This page contains two examples of solving stiff ordinary differential equations usingode15s. - Solve Differential Algebraic Equations (DAEs)
Solve ODEs with a singular mass matrix. - Nonnegative ODE Solution
This topic shows how to constrain the solution of an ODE to be nonnegative. - Troubleshoot Common ODE Problems
FAQ containing common problems and solutions.
Automatic Differentiation in ODEs
- Resolve Error: Unable to Assign Expression During Automatic Differentiation
Troubleshoot expression initialization for automatic differentiation. - Supported Operations on Expressions
List of supported operations on expressions for automatic differentiation. - Automatic Differentiation Background
Learn the theoretical aspects of automatic differentiation and its forward and reverse modes.
Featured Examples
Teaching Resources
Applied Ordinary Differential Equations
Learn how to classify ODEs, and methods of solution including separation of variables and integrating factors.
Qualitative Analysis of ODEs
Learn to visualize slope fields and phase planes, compute 1-D equilibria, and perform linear phase plane analysis.
Numerical Methods with Applications
Learn methods for interpolation, numerical integration and derivation, and finite difference methods for differential equations.
Fluid Mechanics
Learn the concepts of dimensional analysis, control volume analysis, internal flow analysis, and conservation equations.







