Ok,... I've got a function to do bilinear interpolation on an array, but I don't know how to pass the array name to the function. In the example below, I have it hard coded to the array "grid" I would like to be able to specify that name when I call the function if possible.
for example,...
BilinearInterpValue2# ( x1# , y1# , arrayname$)
for example,...
BilinearInterpValue2# ( x1# , y1# , arrayname$)
Function BilinearInterpValue2# ( x1# , y1# ) X_low = Int ( Floor(x1) ) X_hi = Int ( Ceil (x1) ) Y_low = Int ( Floor(y1) ) Y_hi = Int ( Ceil (y1) ) x_per# = x1 - x_low y_per# = y1 - y_low p00 = grid ( x_low , y_low ) p10 = grid ( x_hi , y_low ) p01 = grid ( x_low , y_hi ) p11 = grid ( x_hi , y_hi ) i1 = p00 + (p10 - p00) * x_per i2 = p01 + (p11 - p01) * x_per Return i1 + (i2-i1) * y_per End Function