Inverse Distance Weighted (IDW) or Simple Moving Average (SMA) INTERPOLATION
This function computes at (Xi,Yi) unknown locations the IDW (w<0) or the SMA (w=0) predictions using r1 neighbourhood type ('n':number of points; 'r':radius) and r2 neighbourhood size from Vc measured values at (Xc,Yc) locations.
%% OUTPUTS
% Vi: (mandatory) [PxQ] gIDW interpolated values
% --> P=1, Q=1 yields interpolation at one
% point
% --> P>1, Q=1 yields interpolation at a
% vector of points
% --> P>1, Q>1 yields interpolation at a
% (ir)regular grid of points
%========================================
%% INPUTS
% Xc: (mandatory) [Nx1] x coordinates of kno