[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: spline with NaNs
From: |
mallet |
Subject: |
Re: spline with NaNs |
Date: |
Tue, 18 May 2010 07:54:40 -0700 (PDT) |
James Sherman Jr.-2 wrote:
>
> Well, as a quick hack, you could do something like:
>
> valid_indices = ~isnan(param.two);
> P = spline(param.one(valid_indices), param.two(valid_indices));
>
> In fact, my guess is that this is what Matlab does at the beginning of its
> code, though I don't know for sure.
>
Hum i’m not sure because in spline.m from Matlab there is:
«% Check that data are acceptable and, if not, try to adjust them
appropriately
[x,y,sizey,endslopes] = chckxy(x,y);»
I don’t know what is chckxy…
Anyway, in my case the NaN was an error of imported data. I fixed it and i
don’t have NaN anymore.
But there still a difference between Octave and Matlab using spline with
NaNs.
--
View this message in context:
http://octave.1599824.n4.nabble.com/spline-with-NaNs-tp2219744p2221412.html
Sent from the Octave - General mailing list archive at Nabble.com.