필터 지우기
필터 지우기

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

조회 수: 8 (최근 30일)
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 CenterFile Exchange에서 Matched 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