Using ode45 To Solve a System of 2nd Order ODEs
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rafael Fehér
am 8 Dez. 2020
Kommentiert: Star Strider
am 9 Dez. 2020
I have the following set of 2 Second Order ODEs:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/454688/image.png)
I need to solve these equations simultaneously, so that
in the first equation is used in
in the second equation.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/454693/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/454698/image.png)
I'm looking everywhere for the solution of my problem, but no luck.
I know from https://www.mathworks.com/help/matlab/math/choose-an-ode-solver.html that I need to transform a 2nd Order ODE in a 1st Order ODE, but how to do it with 2 ODEs and in an iterative way?
Can someone help me to use ode45 for this problem?
Thank you,
Rafael F.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 8 Dez. 2020
Code them in the Symbolic Math Toolbox, and use the functions odeToVectorField and then matlabFunction to create an anonymous function that the ODE solvers such as ode45 can use to integrate them. There are other differential equation functions in the Symbolic Math Toolbox Mathematics documentation section if these turn out not to be appropriate for your system.
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!