Frequency response of the multirate multistage filter
returns the complex frequency response,
f] = freqz(
h, of the multirate
multistage filter System object™ and the frequency vector
f at which
h is computed.
n is the number of
frequency points, and
range is the frequency range over which
the response is computed.
For the sample rate converter object, the sample rate is the larger of
Frequency Response of Default Converter
Create a multistage sample rate converter with default properties, corresponding to the combined three filter stages used to convert from 192 kHz to 44.1 kHz. Compute and display the frequency response.
src = dsp.SampleRateConverter; [H,f] = freqz(src); plot(f,20*log10(abs(H)))
Compute and display the frequency response over the range between 20 Hz and 44.1 kHz.
f = 20:10:44.1e3; [H,f] = freqz(src,f); plot(f,20*log10(abs(H)))
Compute Frequency Response of Complex Bandpass Decimator
Compute the complex frequency response of a complex bandpass decimator using the
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)')
n — Number of evaluation points
8192 (default) | positive integer
Number of frequency points for response evaluation, specified as a
positive integer scalar. If
n is not specified, the
default is 8192.
range — Range of frequencies
'half' (default) |
Range considered when computing the frequency response, specified as
'half' (from 0 to π) or
'whole' (from 0 to 2π). If
range is not specified, the defaults is
f — Frequencies in Hz at which response is computed
Frequencies in Hz at which the response is computed, specified as a vector.
h — Complex frequency response
Complex frequency response, returned as a vector.
Complex Number Support: Yes
f — Frequencies at which response is computed
Frequencies at which the response is computed, returned as a vector.