ODE with variable time vector
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Star Strider
2015 年 10 月 7 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!