NDNANFILTER N-dimensional zero-phase digital filter, ignoring NaNs.
[Y,W] = ndnanfilter(X,HWIN,F);
X - Multidimensional data with/without NaNs.
HWIN - Window's name (N-D moving average by default: 'rectwin').
F - Vector specifying the semi-width of the window for each dimension.
Y - Filtered/smoothed X data (same size as X!) with zero phase shift.
W - N-dimensional window with central symmetry generated by a special subfunction called NDWIND.
This function applies a N-dimensional convolution of X with W, using the MATLAB's IMFILTER or CONVN function, ignoring/interpolating/filling NaNs.
By default, the edges are padded with the values of X at the borders with the PADARRAY MATLAB's function. When PADARRAY is not found, the program performs zero-padding.
* See the screenshot.
Carlos Adrian Vargas Aguilera (2021). ndnanfilter.m (https://www.mathworks.com/matlabcentral/fileexchange/20417-ndnanfilter-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: moving_average v3.1 (Mar 2008)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!