Frequency response of filter
[h,w] = freqz(sysobj,n)
[h,w] = freqz(sysobj,Name,Value)
[ returns the complex
h of the filter System object™,
w contains the frequencies (in radians)
at which the function evaluates the frequency response. The frequency
response is evaluated at 8192 points equally spaced around the upper
half of the unit circle.
freqz uses the transfer function associated
with the filter to calculate the frequency response of the filter
with the current coefficient values.
plot the magnitude and unwrapped phase of the frequency response of
the filter System object
For more information about optional input arguments for
freqz in Signal Processing Toolbox™ documentation.
Filter System object.
The following Filter System objects are supported by this analysis function:
Number of samples. For an FIR filter where
Specify optional comma-separated pairs of
Name is the argument
Value is the corresponding
Name must appear
inside single quotes (
You can specify several name and value pair
arguments in any order as
'Arithmetic'— Value types:
Specify the arithmetic used during analysis. When you specify
the function performs double- or single-precision analysis. When you
'fixed' , the arithmetic changes depending
on the setting of the
and whether the System object is locked or unlocked.
When you do not specify the arithmetic for non-CIC structures, the function uses double-precision arithmetic if the filter System object is in an unlocked state. If the System object is locked, the function performs analysis based on the locked input data type. CIC structures only support fixed-point arithmetic.
Frequency vector of length
This examples plot the frequency response of the lowpass FIR filter using
b = fir1(80,0.5,kaiser(81,8)); firFilt = dsp.FIRFilter('Numerator',b); freqz(firFilt);
There are several ways of analyzing the frequency response of
freqz accounts for quantization effects
in the filter coefficients, but does not account for quantization
effects in filtering arithmetic. To account for the quantization effects
in filtering arithmetic, refer to function
freqz calculates the frequency response
for a filter from the filter transfer function Hq(z).
The complex-valued frequency response is calculated by evaluating Hq(ejω)
at discrete values of w specified by the syntax
you use. The integer input argument
the number of equally-spaced points around the upper half of the unit
circle at which
freqz evaluates the frequency
response. The frequency ranges from 0 to π radians per sample
when you do not supply a sampling frequency as an input argument.
When you supply the scalar sampling frequency
an input argument to
freqz, the frequency ranges
from 0 to