ODE with variable time vector
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, t is my time vector which is defined as
t = tstart:dt:tend;
The ODE is solved this way:
ode15s(@ode, t, ...)
At a known time, the gradient dxdt gets in a very short time to a very high value.
To solve this, dt must be very small. The rest of ODE could be solved with a dt which is several times higher.
Can I give a time vector with a variable scale? Or have I to define three seperate ode solver with the required time vector?
0 Commenti
Risposte (1)
Star Strider
il 7 Ott 2015
Your time vector can be whatever you want it to be (providing it has at least three elements), but those will be the times the ODE solver outputs the results of the integration. The solver will evaluate your ODE with adaptive time intervals just as it normally would.
If you have discontinuities in your ODE function, you can usually see them by plotting the ODE function first, and defining your time vector to avoid them.
0 Commenti
Vedere anche
Categorie
Scopri di più su Ordinary Differential Equations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!