comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Non-monotonic Abscissa values for IDL function SPLINE_P
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Non-monotonic Abscissa values for IDL function SPLINE_P [message #66716] Tue, 02 June 2009 09:40
Xavier Ceamanos Garci is currently offline  Xavier Ceamanos Garci
Messages: 2
Registered: June 2009
Junior Member
Hi folks!

I have a question regarding the IDL SPLINE_P function. It works as
follows...

SPLINE_P, X, Y, Xr, Yr, [INTERVAL]

Where 'X' is the original abscissa vector (let's say 0:1:249, in my
example) and 'Y' the vector I'd like to interpolate (n_elements(Y)
=250, of course).

Then 'Xr' and 'Yr' are the outputs containing the abscissa values of
the interpolated function and the interpolated vector, respectively.

The keyword INTERVAL sets the desired interval between interpolants.

The problem appears when checking the output Xr and Yr size. Normally,
their size should be (250-1)*INTERVAL+1. However, that is not the
case. For INTERVAL=100 I get an output size equal to 25147 instead of
24901. The reason is that the output abscissa is not monotonic and
that does allow me to continue working with the Y output.

Does anyone know how to make it monotonic?

I would like to use this function instead of SPLINE since the latter
is bloody slower than the the first!

I thank you all in advance,

Cheers,

Xavi
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SVD
Next Topic: ENVI Log Manager

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 11:13:05 PDT 2025

Total time taken to generate the page: 2.66624 seconds