How can I make a function of 2 variables and given a 2D array, it would return an interpolated value?
I have N x M array A. I need to inter
Have you seen the interp2 function?
From MatLab documentation:
ZI = interp2(X,Y,Z,XI,YI) returns matrix ZI containing elements corresponding to the elements of XI and YI and determined by interpolation within the two-dimensional function specified by matrices X, Y, and Z. X and Y must be monotonic, and have the same format ("plaid") as if they were produced by meshgrid. Matrices X and Y specify the points at which the data Z is given. Out of range values are returned as NaNs.