This function returns the complex frequency response H of the rational IIR filter whose numerator and denominator coefficients are B and A, respectively.
[H, W] = freqz(B, A, N, "whole") [H, W] = freqz(B) [H, W] = freqz(B, A) [H, W] = freqz(B, A, N) H = freqz(B, A, W) [H, W] = freqz(..., FS) freqz(...)
Integer or Vector
Return the complex frequency response H of the rational IIR filter whose numerator and denominator coefficients are B and A, respectively.
The response is evaluated at N angular frequencies between 0 and 2*pi.
The output value W is a vector of the frequencies.
If A is omitted, the denominator is assumed to be 1 (this corresponds to a simple FIR filter).
If N is omitted, a value of 512 is assumed. For fastest computation, N should factor into a small number of small primes.
If the fourth argument, "whole", is omitted the response is evaluated at frequencies between 0 and pi.
'freqz (B, A, W)'
Evaluate the response at the specific frequencies in the vector W. The values for W are measured in radians.
'[...] = freqz (..., FS)'
Return frequencies in Hz instead of radians assuming a sampling rate FS. If you are evaluating the response at specific frequencies W, those frequencies should be requested in Hz rather than radians.
'freqz (...)'
Plot the magnitude and phase response of H rather than returning them.