How to solve a systems of ODE and Algebraic Equations
Ältere Kommentare anzeigen
I have a system of 3 nonlinear ODE and 2 nonlinear algebraic equations.
Please how can I solve these systems of equation.
ODE 45 can easily solve the ODE part. However, I don't know how to combine the solution from ODE45 and the algebraic equations.
Thank you.
2 Kommentare
James Tursa
am 28 Jan. 2021
Please show us the equations you are working with.
it sounds like what you're after is "how to solve a DAE" if the algebraic eqations constrain the solutions of the ODE part https://www.mathworks.com/help/matlab/math/solve-differential-algebraic-equations-daes.html
otherwise, if the algebraic equations aren't constraints (ie. they determine diagnostic variables), you probably want to solve the ODE and then solve the algebraic equations 'offline' using e.g. fsolve
Akzeptierte Antwort
Weitere Antworten (1)
Telema Harry
am 28 Jan. 2021
Bearbeitet: Telema Harry
am 28 Jan. 2021
0 Stimmen
2 Kommentare
Alex Sha
am 29 Jan. 2021
Hi, since: u = x(3) + A.* sin(w.*t) and y = 25 - (5 - u).^2, so y = 25 - (5 - ( x(3) + A.* sin(w.*t))).^2, substitute y into dx1dt and dx2dt, then pure ODE functions will be formed.
Nikhil Kapoor
am 16 Apr. 2022
How to do this?
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!