- You think that you have started the integration with the same parameters, but accidently you didn't. Bugs happen.
- The function to be integrated contains discontinuities. This is outside the specifications of Matlab's integrators and must be caught by an event function. See http://www.mathworks.com/matlabcentral/answers/59582#answer_72047 . Then tiny variations of the input can cause a completely different output and runtime.
- The function contains calls to a subfunction, when it is stored in a specific folder. So a function in either the same folder or a private subfolder shadows a builtin oder user-defined function.
- It is not the integrator, which needs more time, but another task on the computer: E.g. when the input data are read from the disk and a sector is damaged, the reading will take much longer. Or the computer started the virus detection or hard disk defragmentation.
ode15s get stuck randomly
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I'm running into a weird problem with the ode15s solver. At the beginning my code was running perfectly well, but since a little while sometimes the ode15s solver get stuck either at a timestep in the middle of the run or even at the first iteration.
What I mean by stuck is that it takes a really really long time to finally end the time step. My wonder comes from the fact that I happened a few time that running the code with the exact same parameters as when stuck, but in a new folder and recopying the files one by one there, the code would run at a much more "reasonable" speed...
Have anyone run into that kind of issue or know where it could be coming from?
Thanks a lot,
Flavien
0 个评论
采纳的回答
Jan
2013-3-14
This sounds like a magic behaviour. But without any doubt Matlab acts deterministically. Different guesses:
The solution is always the same: Use the debugger to find the differences between the versions running with different speeds. Check if the effect is reproducible.
更多回答(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!