Solve ODE
Description
The Solve ODE task lets you interactively solve a system of ordinary differential equations. The task automatically generates MATLAB® code for your script.
Using this task, you can:
Select the form of the system of ordinary differential equations, and specify the system by writing a function using a provided template.
Specify the Jacobian, events, and initial slope.
Use an automatically selected solver or select a solver, and specify solver options such as tolerances.
Solve the ODE for a specified time interval and number of interpolation points per step.
Visualize the solutions of the ODE while the solver runs or when the solver finishes.
For more information about Live Editor tasks generally, see Add Interactive Tasks to a Live Script.
Open the Task
To add the Solve ODE task to a live script in the MATLAB Editor:
On the Live Editor tab, select Task > Solve ODE.
In a code block in the script, type a relevant keyword, such as
ode
. SelectSolve ODE
from the suggested command completions.