X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 03 Jun 2009 03:43 AM by  anon
Non-monotonic Abscissa values for IDL function SPLINE_P
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
03 Jun 2009 03:43 AM
    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
    You are not authorized to post a reply.