help-octave
[Top][All Lists]
Advanced

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

Re: Problem with "NA"


From: Terry Duell
Subject: Re: Problem with "NA"
Date: Fri, 22 Feb 2013 08:22:28 +1100
User-agent: Opera Mail/12.14 (Linux)

Hello Stephen,

On Fri, 22 Feb 2013 01:57:45 +1100, Stephen Montgomery-Smith <address@hidden> wrote:

On 02/20/2013 08:15 AM, Jordi GutiƩrrez Hermoso wrote:
On 19 February 2013 22:56, Stephen Montgomery-Smith
<address@hidden> wrote:
I think that a much more likely source of creating NA is in evaluating
the right hand side function.  That is, you are solving:

You should never be getting NA unless you specifically requested it,
not unless you've stumbled upon a great coincidence.

NA is a NaN with a special bit-pattern, modelled on R's own NA. It may
be read in from data that is already in the NA form, but you should
never do computations with ordinary floats and get an NA. If you do,
we have a bug.

If or when the original poster figures out what the problem was, I would
be grateful if he would post the solution.  Now I am really intrigued.



I am slowly getting there as a result of finding a couple of simple errors, now get every time step calculated sensibly for the trailer motions, and all but the last 6 time steps appear OK for the prime mover.

The behaviour described above gave me the clue, it must have something to do with the road surface input to the prime mover, not yet seen by the trailer...and sure enough at around 6 time steps before the end the front wheel input is suddenly "NA", while the following wheels have sane inputs. I have it all working now, as it should, but only by using a "sledge hammer". I must have domestic blindness, because I can't see why that first wheel input goes haywire.
Not to worry, it will come clear soon.

You may have missed this which I posted on 20 Feb., or was looking for more detail. I am using a road profile with elevation points at fixed spacing. The forward increment of the vehicle at each time step is much smaller than the point spacing, so I interpolate the profile to find the vertical tyre input at each time step. I was allowing the front wheels to run off the profile, onto level surface, at the end of the run. My interpolation was using an incorrect index for the number of profile points, and in the last profile segment, was trying to interpolate beyond the profile vector and returned NA for the profile height.

Cheers,
--
Regards,
Terry Duell


reply via email to

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