A question about the freqz function

3 ビュー (過去 30 日間)
Robert
Robert 2011 年 5 月 29 日
Hi,
My name is Robert and I´m having a minor problem with the freqz function in MATLAB. I´m using it to get the frequency response from a filter in the following way:
H=freqz(zeros,poles,frequency vector,sampling frequency)
however, when I plot the phase in the following way:
plot(180/pi*angle(H))
I don´t get the same phase characteristics as i get if i just write
freqz(zeros,poles,512,sampling frequency)
how do I get the same phase characteristics?
Thanks in advance Sincerely Robert
  2 件のコメント
Walter Roberson
Walter Roberson 2011 年 5 月 29 日
I am not familiar with that function, but I wonder if perhaps you should unwrap() the angle(H) ?
Robert
Robert 2011 年 5 月 30 日
That solved the problem:)
If I write:
plot(180/pi*unwrap(angle(H)))
The characteristics is as it should be.
Thank you so much!

サインインしてコメントする。

回答 (1 件)

Paulo Silva
Paulo Silva 2011 年 5 月 29 日
Try this way:
[h,w]=freqz(zeros,poles,frequency vector,sampling frequency)
plot(frequency vector,w)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by