Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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.