how to see the frequency response of difference equation
Mostrar comentarios más antiguos
Hi I am having the difference equation
y[n] = -0.9y[n-1] +x [n] -x [n-1]
I want to see its frequency response. What should i do
should i first convert it into Z-Form and then proceede Any ideas how to go abt it
1 comentario
moonman
el 15 de Dic. de 2011
Respuesta aceptada
Más respuestas (4)
Wayne King
el 15 de Dic. de 2011
Hi, here you go. If you want to visualize the magnitude:
fvtool([1 -1],[1 0.9]);
If you want the complex-valued response:
[H,W] = freqz([1 -1],[1 0.9]);
plot(W,abs(H));
Wayne King
el 15 de Dic. de 2011
Hi, that's because your graphs are showing the frequency response over [-pi,pi). You can use the 'whole' option in freqz()
[H,W] = freqz([1 -1],[1 0.9],'whole');
plot(W,abs(H));
moonman
el 15 de Dic. de 2011
4 comentarios
moonman
el 15 de Dic. de 2011
Wayne King
el 15 de Dic. de 2011
sorry, in my earlier post I made a mistake with the W = W-pi; with the 'whole' option pi radians/sample is in the middle. I've corrected it above.
Wayne King
el 15 de Dic. de 2011
the book is wrong, the frequency response in magnitude should be 20 at pi radians/sample and -pi radians/sample
moonman
el 15 de Dic. de 2011
moonman
el 15 de Dic. de 2011
0 votos
Categorías
Más información sobre Digital Filter Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!