www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/IIRFilterInputIntoLowpassAndHighpassSubbandsExample.m

    %% Filter Input into Lowpass and Highpass Subbands
% Create a halfband decimator for data sampled at 44.1 kHz. Use a 
% minimum-order design with a transition width of 2 kHz and a stopband
% attenuation of 60 dB.

IIRHalfbanddecim = dsp.IIRHalfbandDecimator(...
    'Specification','Transition width and stopband attenuation',...
    'TransitionWidth',2000,'StopbandAttenuation',60,'SampleRate',44.1e3);
%%
% Filter a two-channel input into lowpass and highpass subbands.
x = randn(1024,2);
[ylow,yhigh] = step(IIRHalfbanddecim,x);