octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #42686] interp1 returns NAs in simple cases wh


From: Rik
Subject: [Octave-bug-tracker] [bug #42686] interp1 returns NAs in simple cases where 0 expected
Date: Sat, 05 Jul 2014 19:38:37 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

Follow-up Comment #3, bug #42686 (project octave):

Octave tries pretty hard to stay compatible with Matlab and Matlab returns
NaNs for the default case of linear interpolation.  The idea is that one
shouldn't trust interpolated data outside it's region of validity.  Throwing
NAs or NANs indicates that fact and does pollute downstream calculations
purposefully.  The user can override this, but this ensures that a human makes
a conscious choice about how to interpret the data.  For example, instead of
2.1 the requested interpolation point could have been 1e6.  With the "extrap"
option set Octave will return a value, but I wouldn't trust it as it is so far
from the original region. 

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42686>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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