Re: INTERPOL question [message #15751] |
Wed, 09 June 1999 00:00 |
landsman
Messages: 93 Registered: August 1991
|
Member |
|
|
In article <Pine.BSF.4.05.9906091216370.28548-100000@mtolympus.ari.net>,
Anil Kochhar <anilk@mtolympus.ari.net> wrote:
> Hi All,
>
> I am using IDL Version 5.2 (SUNOS Sparc) and am having some trouble
> using the INTERPOL function in idl. I have several pairs of arrays of
> data. One of the Array pairs is an array of time and the other array
> holds a measurememt (i.e. data point) at the corresponding time.
>
> I used the following command to interplolate the arrays:
>
> Pair2DataNew = Interpol (Pair2Time, Pair2Data, Pair1Time)
> Pair3DataNew = Interpol (Pair3Time, Pair3Data, Pair1Time)
> Pair4DataNew = Interpol (Pair4Time, Pair4Data, Pair1Time)
> Pair5DataNew = Interpol (Pair5Time, Pair5Data, Pair1Time)
>
It looks like you have the X and Y parameters reversed, and for example,
the first line should read
Pair2DataNew = Interpol( Pair2Data, Pair2Time, Pair1Time)
Other potential problems with using Interpol (although probably not in
your case) include
1. Not using a montonic input X parameters (e.g. Pair2Time)
2. INTERPOL extrapolates beyond the edges, so you can get bizarre
results if you try to extrapolate too far on non-smooth data.
--Wayne Landsman landsman@mpb.gsfc.nasa.gov
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
|
|
|