For what reason an ODE solver could run for ever?
Show older comments
I am running a simulation with ODE4 and it seems that it will never end(3 hours now).I have already run it before with less time,like t=0:0.1:1000 and it took like 20 minutes to run.Now I doubled the time(t=0:0.1:2000) and i was expecting a running time of 40 minutes,propotional to my previous run.But not.What could cause it?
2 Comments
Andrew Reibold
on 26 Nov 2014
"My code takes longer when there are more equations to solve. [This makes sense] However, my code took longer than I expected it to. Why?"
Not nearly enough information to address this. We can only troubleshoot with what you provide us
Mike Hosea
on 26 Nov 2014
Did you mean ODE45 or actually ODE4? I don't know what ODE4 looks like. If it is a fixed step method, I would say Mohammad is on the right track. If variable step, then there are several possibilities such as those mentioned by Star Strider I would probably suspect first.
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!