Thread: ode45
View Single Post
Old Sep 27, 2006, 08:32 PM   #1 (permalink)
TheBlackCat
DriverHeaven Senior Member
 
TheBlackCat's Avatar
 
Join Date: Jul 2006
Location: Searching for the Candle in the Dark
Posts: 567
TheBlackCat will become famous soon enough

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


TheBlackCat is offline   Reply With Quote