Code covered by the BSD License  

Highlights from
nanmedfilt2

5.0

5.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 1.55 KB File ID: #41457

nanmedfilt2

by

 

This MATLAB function performs median filtering of the matrix A in two dimensions while ignoring NaNs

| Watch this File

File Information
Description

This MATLAB function performs median filtering of the matrix A in two dimensions
while *ignoring* NaNs (based on discussions here
http://www.mathworks.com/matlabcentral/newsreader/view_thread/251787)

Required Products MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
09 Oct 2014 Chad Greene

This function is quite useful, and it's fast. I find that nanmedfilt2 takes roughly twice as long as the medfilt2 function found in the image processing toolbox. That's not perfect, but it's faster than any other manual solutions I have tried. I recommend changing line 9 to sz=3 to match the default 3-by-3 neighborhood of medfilt2.

Contact us