decimate
Lowpass filter and downsample a vector.
📝Syntax
Y = decimate(X, Q)
Y = decimate(X, Q, N)
Y = decimate(X, Q, N, 'iir')
Y = decimate(X, Q, N, 'fir')
📥Input Arguments
Parameter Description
X nonempty input vector.
Q integer decimation factor greater than one.
N filter order. The default order is 8 for IIR mode and 30 for FIR mode.
📤Output Arguments
Parameter Description
Y decimated vector.
📄Description

decimate applies an anti-aliasing lowpass filter and keeps every Q-th sample. The default mode uses an IIR Chebyshev type I lowpass filter with zero-phase forward and reverse filtering. The 'fir' mode uses a windowed FIR lowpass filter and compensates its delay before downsampling.

💡Examples
y = decimate(1:20, 2, 4, 'fir');
🔗See Also
downsampleresampleupfirdn
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub