I need to plot a phase response using freqz function. Can you please help with it.

21 ビュー (過去 30 日間)
gerald bamundaga
gerald bamundaga 2022 年 10 月 2 日
編集済み: Geetla Sindhu 2022 年 10 月 6 日
system was given h[n]
I obtained the frequency response and the phase below. when i plotted it did not look right.
Can please help me to plot it using the freqz command.
angle(H(e^jw)= tan ^-1(sin(w)-2*sin(w)+4*sin(3*w)-4*sin(5*w)+3sin(6*w)-2*sin(7*w)+sin(8*w))/(1-2*cos(w)+3*cos(2*w)-4*cos(3*w)+4*cos(5*w)-3*cos(6*w)+2*cos(7*w)-8*cos(8*w)

回答 (1 件)

Geetla Sindhu
Geetla Sindhu 2022 年 10 月 6 日
編集済み: Geetla Sindhu 2022 年 10 月 6 日
Hello Gerald,
I understand that you are trying to plot the phase of the frequency response of the system using “freqz” command.
You can try the following workaround to solve the issue:
  • If the system transfer function is given in the form of
Use
[H,w] = freqz(B,A,n,fs)
where, B = [b(1) b(2) … b(M)]
A = [a(1) a(2) … a(N)]
fs = Sampling rate
Please refer to Frequency response of digital filter - MATLAB freqz(mathworks.com) for further information regarding "freqz" command.
  • In order to get the phase response of the system in degrees, use
plot(w,angle(H)*360/(2*pi))
You can also refer to the example below for reference:
Thank you.

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by