How to tell ode15s to change its max time step for a specific short time range?
6 次查看(过去 30 天)
显示 更早的评论
I have a dynamic system coded in Matlab and solved using ode15s, and it works fine except it is slow because of the system size. I must give the solver a small step size (say 1e-4) for a very short time (0.05 s - 0.1 s) when there is a chnge in the system network. The rest of simulation time (20 s) can be simulated with a step size 1e-1 and it gives a satisfactory result. Is there is any possibility to tell the solver to change its step size (max. step size) during this short time?
Thanks
Ismael
0 个评论
采纳的回答
Torsten
2019-6-12
Integrate from 0 to 0.05, restart the solver and solve from 0.05-0.1, restart the solver and solve from 0.1 - 20. Every time you restart the solver, you can change the maximum step size.
3 个评论
Torsten
2019-6-12
The initial values of run "n" are the results for the last output time of run "(n-1)".
更多回答(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!