Frequency response of filter
[h,w]
= freqz(hfilt)
[h,w]
= freqz(hfilt,n)
freqz(hfilt)
[h,w]
= freqz(hs)
[h,w]
= freqz(hs,n)
[h,w] =
freqz(hs,Name,Value)
freqz(hs)
freqz
returns the frequency response based
on the current filter coefficients. This section describes common freqz
operation
with discretetime filters and multirate filters, and filter System
objects. For more input options, refer to freqz
in Signal Processing Toolbox™ documentation.
[
returns the frequency
response h
,w
]
= freqz(hfilt
)h
and the corresponding frequencies w
at
which the filter response of hfilt
is computed.
The frequency response is evaluated at 8192 points equally spaced
around the upper half of the unit circle.
[
returns
the frequency response h
,w
]
= freqz(hfilt
,n
)h
and corresponding frequencies w
for
the filter or vector of filters hfilt
. The frequency
response is evaluated at n
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.
freqz(
uses
FVTool to plot the magnitude and unwrapped phase of the frequency
response of the filter hfilt
)hfilt
. If hfilt
is
a vector of filters, freqz
plots the magnitude
response and phase for each filter in the vector.
[
returns a frequency response
for the filter System object™ h
,w
]
= freqz(hs
)hs
using 8192
samples.
[
returns
a frequency response for the filter System object h
,w
]
= freqz(hs
,n
)hs
using n
samples.
[
returns
a frequency response with additional options specified by one or more h
,w
] =
freqz(hs
,Name,Value
)Name,Value
pair
arguments.
freqz(
uses
FVTool to plot the magnitude and unwrapped phase of the frequency
response of the filter System object hs
)hs
.

Complex, 

Frequency vector of length 
Plot the estimated frequency response of a filter. This example
uses discretetime filters, but hd
can be any dfilt
object, mfilt
object,
or filter System object. First plot the results for one filter.
b = fir1(80,0.5,kaiser(81,8)); hd = dfilt.dffir(b); freqz(hd);
If you have more than one filter, you can plot them on the same figure using a vector of filters.
b = fir1(40,0.5,kaiser(41,6)); hd2 = dfilt.dffir(b); h = [hd hd2]; freqz(h);