|
ode45
Anybody here familiar with matlab's ode45 function? We ran into a weird problem in class. For some reason ode45 would work for some people, but not for others. Some people it could solve a system of four 1st-order ODEs. However, for other people solving the exact same ODEs resulted in rampant divide by zero errors.
What is more, the conditions under which the divide by zero errors occured varied. Some people got them for low values of a particular parameter and others for high. Everybody was using the same ODEs but wrote their own code to implement them. The matlab version didn't seem to make a difference (everybody with the problem used r 14), nor did OS (everybody was using Windows XP). Switching to ode15s or ode113 fixed the problem for everyone who had it.
I wouldn't think the ODE was that stiff, it certainly wasn't too stiff for most people, but perhaps it was borderline enough for small differences to push it over. The teacher has been teaching the course for years and never had that problem, but the course wasn't taught last year (when the version everyone with the problem was using came out).
__________________
There is always an easy solution to every human problem—neat, plausible and wrong.
-H. L. Mencken
|