Hi Nevzat,
What about the following lines of code. They use BILINEAR(), which uses a bilinear interpolation algorithm to compute the value of a data array at each of a set of subscript values:
P = FINDGEN(3,3)
IX = 0.5 ;Define the X subscript.
JY = 0.0 ;Define the Y subscript.
Z = BILINEAR(P, IX, JY) ;Interpolate.
PRINT, Z ;Print the value at the point IX,JY within P.
;Suppose we wish to find the values of a 2 x 2 array of points in P. Create the subscript arrays IX and JY:
IX = [[0.5, 1.9], [1.1, 2.2]] ;Define the X subscripts.
JY = [[0.1, 0.9], [1.2, 1.8]] ;Define the Y subscripts.
Z = BILINEAR(P, IX, JY) ;Interpolate.
PRINT, Z ;Print the array of values.
And for the surface, you could use the SURFACE function that is available in the new graphics of IDL 8.1. For example:
hanning=hanning(500,500)
surf_hann = SURFACE(hanning, COLOR='light_blue')
|