Re: correct way to use INTERPOLATE function [message #55974 is a reply to message #55973] |
Fri, 21 September 2007 14:06   |
rchughes
Messages: 26 Registered: April 2006
|
Junior Member |
|
|
> Is that waht you are trying to do?
Thanks Paolo and David. That's not what I wanted to do but it did
help me out to produce the plot I want. I want to create a smallarray
vs. largearray plot but If I just tried to plot it, IDL will do what
it does best and plot only the first N_ELEMENTS(smallarray) points.
The code that I did come up with is as follows (It is very close to
what Paolo had):
l = FINDGEN(100)*0.5
s = [10.3, 9.6, 9.2, 8.5, 7.7, 6.9, 5.8, 5.4, 4.7, 4.1]
ns = N_ELEMENTS(s)
nl = N_ELEMENTS(l)
x = FINDGEN(ns)/(ns-1)
x2 = FINDGEN(nl)/nl
z = INTERPOL(s, x, x2)
PLOT, z, l, PSYM=-6
Thanks for your help,
Ryan.
|
|
|