Given a gridded surface Z corresponding to X and Y, this function will replace points in Z with NaN (or any other value you declare) if they are farther than maxdist from any point given by x,y. See the demo file for a example.
Chad Greene (2021). replacefartherthan (https://www.mathworks.com/matlabcentral/fileexchange/46830-replacefartherthan), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!