Signal Toolkit - phasez


Function File: [phi, w] = phasez (b, a, n)
Function File: [phi, w] = phasez (b, a)
Function File: [phi, w] = phasez (sos, n)
Function File: [phi, w] = phasez (sos)
Function File: [phi, w] = phasez (…, n, "whole")
Function File: [phi, w] = phasez (…, n, Fs)
Function File: phasez (…)

Compute the phase response of digital filter defined either by its coefficients (b and a are the numerator and denominator coefficients respectively) or by its second-order sections representation, given by the matrix sos. The output phi is the phase response computed in a vector the vector of frequencies w.

The phase response is evaluated at n angular frequencies between 0 and pi.

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.

If the third/forth argument, "whole", is given, the response is evaluated at n angular frequencies between 0 and 2*pi. It is possible also to pass the value "half", which will lead to the default behaviour.

Example:

 [b, a] = butter (2, [.15,.3]);
 phasez (b, a);
 

Ref [1] Oppenheim, Alan, and Ronald Schafer. Discrete-Time Signal Processing. 3rd edition, Pearson, 2009.

See also: freqz, phasedelay.