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

Home » Public Forums » archive » correct way to use INTERPOLATE function
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
correct way to use INTERPOLATE function [message #55983] Fri, 21 September 2007 11:00
rchughes is currently offline  rchughes
Messages: 26
Registered: April 2006
Junior Member
Hi All,

I want to plot two arrays of different sizes so I am trying to use
INTERPOLATE on the smaller array to make it the same size as the large
one. I can't seem to use the INTERPOLATE function correctly and there
isn't very much documentation on how to generalize it's use. I need
help in generalizing its use. All I get as a result is the first
element repeated (the same result I would get if I used the REPLICATE
function). I want to do this in the general case because I need to do
it a few times. Here is a simpler version of what I am doing:

smallarray = [10.3, 9.6, 9.2, 8.5, 7.7, 6.9, 5.8, 5.4, 4.7, 4.1]
largearray = FINDGEN(1000)*0.5

smsize = N_ELEMENTS(smallarray)
lasize = N_ELEMENTS(largearray)

interpped = INTERPOLATE(smallarray, smsize/(lasize-1)*FINDGEN(lasize))

PLOT, interpped, largearray

One feature of the small array is that it is decreasing throughout and
has approximately 100 elements. The large array has several thousand
elements. I believe there is an error in the equation I have in the
second argument.

Thanks,
Ryan.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Widgets to ION JAVA
Next Topic: News server

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

Current Time: Wed Oct 08 19:16:08 PDT 2025

Total time taken to generate the page: 0.00682 seconds