How to plot poles, zeros and impulse response of a transfer function I want to plot poles and zeros as well as impulse response of a transfer function that is given below:
$$H(z) = -0.0625z^4 + 0.25z^3 + 0.625z^2 + 0.25z -\frac{0.0625}{z^4}$$
For poles and zeros, I used MATLAB function residuez. However, I got error which is similar in impulse response plot.
code:
 b = [-0.0625 0.25 0.625 0.25 -0.0625];
 a = [0 0 0 0 1];
 [R,p,C] = residuez(b,a); % for poles 
 y = impz(b,a); %for impulse response
 figure(1);
 stem(y);

Could someone help.
Thanks
Two hints:

The standard way of writing a transfer function in the $\mathcal Z$ domain is a rational function in $z^{-1}$, not in $z$. Try this
Use tf2zp() instead of residuez()