Signal Processing Toolbox Previous page   Next Page

Median Filtering

The function medfilt1 implements one-dimensional median filtering, a nonlinear technique that applies a sliding window to a sequence. The median filter replaces the center value in the window with the median value of all the points within the window [5]. In computing this median, medfilt1 assumes zeros beyond the input points.

When the number of elements n in the window is even, medfilt1 sorts the numbers, then takes the average of the (n-1)/2 and (n-1)/2 + 1 elements.

Two simple examples with fourth- and third-order median filters are

See the medfilt2 function in the Image Processing Toolbox documentation for information on two-dimensional median filtering.


Previous page  FFT-Based Time-Frequency Analysis Communications Applications Next page

© 1994-2005 The MathWorks, Inc.