octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MATLAB 5.3.1 (1999) and latest Octave math discrepancy ..


From: Daniel J Sebald
Subject: Re: MATLAB 5.3.1 (1999) and latest Octave math discrepancy ..
Date: Fri, 22 Mar 2013 15:18:37 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 03/22/2013 02:54 PM, Will Flannery wrote:

Hi, I'm running a long simulation of the Juno space probe that has about
4,000,000 iterations, the computer is a DELL laptop running Windows XP, and
I get different trajectories using MATLAB and Octave.  The math used is the
4 basic operations plus squaring with the exponent operator and the sqrt
function.  The differences occur after 5 significant digits and two million
iterations, then the physics takes over and the trajectories diverge
significantly.  I cut and pasted the program from MATLAB to Octave without
and changes necessary.

Is there any explanation for this?

<http://octave.1599824.n4.nabble.com/file/n4651123/juno1.jpg>

<http://octave.1599824.n4.nabble.com/file/n4651123/Figure13.jpg>

If you'd prefer to not disclose your code, you'll have to be more descriptive and help to isolate the problem. Five significant digits of what? After squaring? After exponentiation? After square rooting?

From the figures, it looks like your concern is that the trajectories appear to match up to a certain iteration then quickly accuracy is lost. Is that correct? The odd thing is that it doesn't seem to be the magnitude of displacement (distance) that is an issue because the point of divergence looks to be as a distance which was similar to that near the start. Are you using absolute time in your algorithm in some way (that its value might become so large), or is it just delta time?

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]