No BSD License  

Highlights from
ndnanfilter.m

5.0

5.0 | 4 ratings Rate this file 16 Downloads (last 30 days) File Size: 16.28 KB File ID: #20417
image thumbnail

ndnanfilter.m

by Carlos Adrian Vargas Aguilera

 

23 Jun 2008 (Updated 01 Jul 2008)

Filter/smoothing of multidimensional data with an specified window function, ignoring NaNs.

| Watch this File

File Information
Description

NDNANFILTER N-dimensional zero-phase digital filter, ignoring NaNs.
 
SHORT SYNTAX:
[Y,W] = ndnanfilter(X,HWIN,F);
 
SHORT INPUT:
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.

SHORT OUTPUT:
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.
 
SHORT DESCRIPTION:
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.

SHORT NOTE:
* See the screenshot.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
moving_average v3.1 (Mar 2008)
This submission has inspired the following:
imagescnan.m v2.1 (Aug 2009)

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
25 Jun 2008 Mat Lab

This is what FEx is all about! Thanks Carlos!

30 Jun 2008 Fred Duncan  
02 Sep 2008 Bill Horton

2Dimensional hamming! Incrdible!

05 Jun 2009 Ueli Rutishauser  
Please login to add a comment or rating.
Updates
27 Jun 2008

1. Fixed small bug with vector input (force F=0 in the second dimension)
2. Small changes in the description above.

01 Jul 2008

Fixed bug: ynan = any(inan(:)) instead of any(inan).

Tag Activity for this File
Tag Applied By Date/Time
filter design Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
filter analysis Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
smooth Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
filter Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
filter2 Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
conv Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
conv2 Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
convn Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
imfilter Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
gap Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
window Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04
ru Carlos Adrian Vargas Aguilera 22 Oct 2008 10:07:04

Contact us at files@mathworks.com