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

    %% Single-Stage Filters
% Create |src|, a multistage sample rate converter with default properties.
% |src| converts between 192 kHz and 44.1 kHz. Find the individual filters
% that are cascaded together to perform the conversion.

% Copyright 2015 The MathWorks, Inc.


%%

src = dsp.SampleRateConverter;
c = getFilters(src);

%%
% Visualize the frequency response of the decimator used in the
% first stage of the process.

m = c.Stage1;

[h,w] = freqz(m);
plot(w/pi,20*log10(abs(h)))
xlabel('\omega / \pi')
ylabel('Magnitude (dB)')