How to solve multiple n^th order differential equation using single ode45?
显示 更早的评论
回答(1 个)
Walter Roberson
2022-4-29
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
