This function is similar to taking a 2D moving average or moving variance, etc., but data do not need to be regularly spaced.
Chad Greene (2021). scatstat2 2D local statistics (https://www.mathworks.com/matlabcentral/fileexchange/57946-scatstat2-2d-local-statistics), MATLAB Central File Exchange. Retrieved .
As I can see this function take also value of location for which mean is computed. If we compute mean for location x,y we shouldn't take value from that location or?
Also maybe it would be useful to add weights as wi=1/(1+di/radius)...
Inspired by: Moving averages / Moving median etc, Moving variance, RUNMEAN, Savitzky-Golay smoothing filter for 2D data, Moving Average Function, Moving Average Filter (2D), Moving-window mean and variance
Inspired: filt2 2D geospatial data filter
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!