MATLAB: Two dimensional extrapolation

interpolation

Does anyone know how to do two-dimensional extrapolation for out of range values?
Z=interp2(X,Y,Z,XI,YI).
In Matlab, you specify "extrapval" for out of range values. If I don't want to specify a value but actually want to extrapolate, any easy way of doing it in Matlab?
Thanks!

Best Answer

I posted the function interpne on the FEX a few years ago. It does what you want, as long as you want linear extrapolation.
Note: extrapolation is a dangerous business.
Related Question