%% Compute Frequency Response of Complex Bandpass Decimator
% Compute the complex frequency response of a complex bandpass decimator using the freqz function.
%
% Create a dsp.ComplexBandpassDecimator object. Set the DecimationFactor to 12, the CenterFrequency to 5000 Hz, and the SampleRate to 44100 Hz.  Compute and display the frequency response.

cbp = dsp.ComplexBandpassDecimator(12,5000,44100);
[h,f] = freqz(cbp);
plot(f,20*log10(abs(h)))
grid on
xlabel('Frequency (Hz)')
ylabel('h (dB)')

% Copyright 2012 The MathWorks, Inc.