Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Frequency response of digital filter

```
[h,w]
= freqz(b,a,n)
```

`[h,w] = freqz(sos,n)`

`[h,w] = freqz(d,n)`

```
[h,w]
= freqz(___,n,'whole')
```

```
[h,f]
= freqz(___,n,fs)
```

```
[h,f]
= freqz(___,n,'whole',fs)
```

`h = freqz(___,w)`

`h = freqz(___,f,fs)`

`freqz(___)`

`freqz(___)`

with
no output arguments plots the frequency response of the filter.

**Note:** If the input to `freqz`

is
single precision, the frequency response is calculated using single-precision
arithmetic. The output, `h`

, is single precision.

The frequency response of a digital filter can be interpreted
as the transfer function evaluated at *z* = *e*^{jω} [1].

`freqz`

determines the transfer function from
the (real or complex) numerator and denominator polynomials you specify
and returns the complex frequency response, *H*(*e*^{jω}),
of a digital filter. The frequency response is evaluated at sample
points determined by the syntax that you use.

`freqz`

generally uses an FFT algorithm to
compute the frequency response whenever you don’t supply a
vector of frequencies as an input argument. It computes the frequency
response as the ratio of the transformed numerator and denominator
coefficients, padded with zeros to the desired length.

When you do supply a vector of frequencies as an input argument, `freqz`

evaluates
the polynomials at each frequency point using Horner’s method
of nested polynomial evaluation, dividing the numerator response by
the denominator response.

[1] Oppenheim, Alan V., Ronald W. Schafer,
and John R. Buck. *Discrete-Time Signal Processing*.
2nd Ed. Upper Saddle River, NJ: Prentice Hall, 1999.

`abs`

| `angle`

| `designfilt`

| `digitalFilter`

| `fft`

| `filter`

| `freqs`

| `impz`

| `invfreqs`

| `logspace`

Was this topic helpful?