How to solve multiple n^th order differential equation using single ode45?
Show older comments
Answers (1)
Walter Roberson
on 29 Apr 2022
0 votes
To set up something like that, I recommend using the Symbolic Toolbox to construct the equations. Then you can use odeToVectorField() https://www.mathworks.com/help/symbolic/odetovectorfield.html and use odeFunction() to construct the anonymous function for use with ode45() . I recommend following the workflow for the first example in the odeFunction() documentation.
ode45() absolutely can handle nth order differential equations, and it can also handle systems of independent differential equations.
For example if you wanted to run the same system of equations with 10 different initial boundary condition values, then ode45() is happy with that, as long as you use appropriate variables references.
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!