I have been given this question

\begin{equation} H\left(z\right)\:=\:\frac{1}{6}\left(1+z^{-2}\right)^6 \end{equation}

(a) Compute and plot the phase response of the system.

(b) Determine analytically $\angle H(e^{j\omega})$ and use the formula obtained to compute and plot the phase response.

(c) Compute and plot the phase response using the function freqz.

First of all how to input the expression into MATLAB? I tried

Hz1 = [1 0 1];
Hz11 = Hz1.^6

but this does not work. Any clues?


3 Answers 3


Answer to (b):

$(1+z^{-2})$ is a Type I generalized linear phase filter with group delay 1 (i.e. the phase response is $\angle H(e^{j\theta})=-\theta$ with a jump of $\pi$ at $\theta = \pm \pi/2$).

6 of those filters in cascade will have group delay 6 (phase response $\angle H(e^{j\theta})=-6\theta$).

  • $\begingroup$ Interesting @Juancho but my problem is the fact of how deal with the 6 on the top. I know that the group delay the negative rate of change of the phase with respect to the frequency but my problem is how to get the phase expression given the problem we have $\endgroup$
    – JordenSH
    Commented Nov 13, 2017 at 19:44
  • $\begingroup$ The exponent 6 is equivalent to 6 equal systems in cascade. Product in Z transform is convolution of the impulse responses. $\endgroup$
    – Juancho
    Commented Nov 13, 2017 at 20:45
H=[1 0 1];

Forms the polynomial

$$ 0.1667 + 1.0 \;z^{-2} + 2.5\; z^{-4} + 3.3333\; z^{-6} + 2.5\; z^{-8} + 1.0 \;z^{-10} + 0.1667 \; z^{-12} $$

which you might observe is symmetric, which is a clue for the phase function

  • $\begingroup$ Is there a shorter way to implement that. Also how would you approach b and c because am completely blank on those. $\endgroup$
    – JordenSH
    Commented Nov 13, 2017 at 4:48
  • $\begingroup$ Not really. Discrete convolution is equivalent to polynomial multiplication. You showed some effort in forming the polynomial. I helped with that. You haven’t shown any effort with b and c. Look at the rules for asking homework questions $\endgroup$
    – user28715
    Commented Nov 13, 2017 at 5:17
  • $\begingroup$ for b and c, since the polynomial has a big power, am like completely lost on where to start $\endgroup$
    – JordenSH
    Commented Nov 13, 2017 at 5:19
  • $\begingroup$ If this was an IIR Filter, I would agree but it’s not and the answers are easy $\endgroup$
    – user28715
    Commented Nov 13, 2017 at 5:58

MATLAB doesnt know that your vector is supposed to be a polynomial, so what your code is doing is something like [1 0 1].^2 => [1^2 0^2 1^2], a new vector which is equivalent to $1^2 + 0^2 z^{-1} + 1^2 z^{-2}$ (not what you want)

Try this instead (requires Symbolic Math toolbox)

% This line takes your original polynomial in vector form 
% and converts it to a polynomial. Here, we can correctly take its sixth power
f = poly2sym([1 0 1])^6;

% Get it back to vector form by taking this polynomial's coefficients
% Flip this vector because of the function coeffs() outputs
c = fliplr(coeffs(f));

% Also convert it to double (since it was in symbolic form) and scale
c = double(c) / 6;

I think you can just input this vector c into the freqz() function as the B parameter (from documentation).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.