Best ODE solver when there is a parameter discontinuity
30 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a system of differential equations where one of the parameters changes value abruptly at one point in time. Which ODE solver is the most accurate and most efficient to use in such a situation? I'm trying to use ode45, but when I use a low tolerance, I'm not getting an accurate answer. When I try to tighten, the tolerance, it is taking an extremely long time to run (it's been running over an hour and still hasn't finished).
Thank you, Kevin
0 个评论
采纳的回答
Jan
2013-8-15
Matlab's integrators cannot handle discontinuities reliably, see e.g. http://www.mathworks.com/matlabcentral/answers/59582#answer_72047. The correct method is to stop the integration at the time point of the change and restart it. Then you can choose the integrator according to the numerical properties of the ODE, most of all its stiffness.
2 个评论
Jan
2013-8-17
The description of the problem is too vague to understand it in detail. Does your function to be integrated depend on a discontinuos parameter? What exactly does "different values at each time point" mean? This would match the parameter "t" also.
更多回答(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!