https://uk.mathworks.com/help/dsp/ref/designmultistagedecimator.html
designMultistageDecimator - Multistage decimator design - MATLAB
This MATLAB function designs a multistage decimator that has an overall decimation factor of M.
decimator designmultistagematlab