How to speed up the simulation time of a big system of ODEs?
Ältere Kommentare anzeigen
Hi Everyone,
I have a big system of equations (378 diff. equations) and I have to simulate it using an ODE solver (I am using ODE23s) but the simulation time is too long.
Is there a way to improve my code in order to have a small simulation time?
Attached you can find the code.
Thank you!
Gabri
Antworten (1)
J. Alex Lee
am 11 Sep. 2020
0 Stimmen
don't use syms
5 Kommentare
Gabriele Galli
am 11 Sep. 2020
J. Alex Lee
am 11 Sep. 2020
i would start from the paper-and-pencil and see if you can define equations numerically, and also vectorially (your variables suggest that). What do your equations look like if you write them down?
Gabriele Galli
am 11 Sep. 2020
J. Alex Lee
am 11 Sep. 2020
well, if you insist on the symbolics approach, i'm afraid i can't help because i don't know how to use the symbolic toolbox (and don't have it).
if you want to step back, the only anyone can help you is if you show the original 18 equations, and why/how you are taking partial derivatives w.r.t. parameters.
Gabriele Galli
am 11 Sep. 2020
Bearbeitet: Gabriele Galli
am 11 Sep. 2020
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!