ode for different time intervals
Ältere Kommentare anzeigen
Hello all,
I have a question regarding applying ode for different time intervals within a set of differential equations. For eg, I have a set of 6 DE of which few eqns has to be integrated over the entire tspan while 1 equation has to be active only after acertain time point (something like two phases of experiment). How can i achieve that in matlab? Should i create nested functions or should i create separate functions and call them in a mian file? I am totally confused. Since few parameters are interdependent I am unable to create separate functions for separate eqns. Please give me some sugestions.
Akzeptierte Antwort
Weitere Antworten (1)
Sam Johnson
am 23 Aug. 2020
0 Stimmen
[t,x] = ode45(@(t,x) x.*(4-x), [0,5], -2.0:4.0:6.0);
plot(t,x)
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!