I'm trying to make a frequency response of that function:


in matlab a made this:

d=[1 -0.494 0.6404];
p=[1 1.58567330897 0.96];
[h,w] = freqz(p,d,40000);
z = abs(h);

d and p i calculated. The plot gives me this: plot

but in book has that answer: answer

as you can see the peak of magnitude is 2 and not about 6.5. '-' What am I doing wrong? H2 has an abs 1 because it is a all pass filter.


Your answer is correct. Please note that your graph is in the range $0$ to $1$ while the graph in the text is in the output range of $-\pi$ to $+\pi$

There is some output scaling issue. But since you are getting the same curve, you are just messing some constants is all.

please try $\text{plot}(w,z)$


Thanks for the answer. I thought that w/pi was for normalize like in ex 1 from freqz function documentation. I did what you said and i get this: enter image description here

sorry about my english i'm from brazil.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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