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

18 visualizaciones (últimos 30 días)
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)

Respuestas (1)

Geetla Sindhu
Geetla Sindhu el 6 de Oct. de 2022
Editada: Geetla Sindhu el 6 de Oct. de 2022
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.

Categorías

Más información sobre Matched Filter and Ambiguity Function en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by