|
|||||||
| Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
DriverHeaven Senior Member
Join Date: Jul 2006
Location: Searching for the Candle in the Dark
Posts: 567
Rep Power: 0 ![]() |
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).
__________________
[color=#000000]There is always an easy solution to every human problem—neat, plausible and wrong.[/color] -H. L. Mencken
|
|
|
|
|
|
#2 |
|
Anti-Piracy Poster Boy
|
The function is of course deterministic so you'd first have to run working code on a machine that had a "non-working" ode45. If it works, then there was bugs in the code that gave errors. If it doesn't work, then there is a problem with the matlab installation.
__________________
"It is because the resistance to paying for copyrighted material, although often characterized as arising from a supposed technical burden or principled concern for the public interest, arises rather from exactly the same segment of the brain that is dominant in shoplifters." - Mark Helprin, Digital Barbarism In other words, it's never okay to steal even if you think you have a good reason! www.yayitsandrew.com
|
|
|
|
![]() |
| Thread Tools | |
|
|