- 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
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Jan
el 14 de Mzo. de 2013
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!