FUNCTION REFERENCE
medfilt1
Filter each signal column with a centered running median.
Filter each signal column with a centered running median.
Syntax
y = medfilt1(x[,n][,'zeropad'|'truncate'])Default n=3 and 'zeropad' (zero padding at each endpoint). 'truncate' omits samples outside the input. Even n uses offsets -n/2 through n/2-1 and averages the two middle sorted values. Row vectors retain their orientation.
Example
y = medfilt1([1 9 2 3 4],3);Example
y = medfilt1([1 9 2 3 4],4,'truncate');Example
y = medfilt1([1 9 2 3 4],3,'zeropad');Differences from MATLAB: finite real doubles only; no NaN policy or dimension options. At most 1048576 input elements and window length 1..4097. The work cap is 2000000000 estimated sorting operations: numel(x)*n*(floor(log2(n))+1). For example, n=101 is supported at the full input limit; n=4097 on a million samples exceeds the cap. Computation remains cancellable.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.