FUNCTION REFERENCE
decimate
Lowpass filter then reduce the sample rate by an integer factor.
Lowpass filter then reduce the sample rate by an integer factor.
Syntax
y = decimate(x,r[,n,'fir'|'iir'])Default: order-8 Chebyshev I lowpass, 0.05 dB ripple and cutoff 0.8/r relative to Nyquist. Forward/backward SOS filtering uses steady-state initial conditions and odd reflection of 3*(n+1) samples at each end, then selects samples 1,1+r,... . The 'fir' form defaults to order 30, a Hamming-windowed sinc at cutoff 1/r with delay compensation and zero extension. This form requires even n. Matrices operate down columns.
Example
y = decimate(sin(0:0.1:12.7),4);Example
y = decimate([0 1 0 -1 0],2,30,'fir');Differences from MATLAB: finite real double inputs only, r is 2..1024. IIR orders must be 1..20 and require more than 3*(n+1) samples. Odd FIR orders and streaming-state forms are rejected.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.