Extract a Bode Plot from a filter

I have this low pass filter and need to extract the bode plot of it.
[b,a]=butter(3,50/1000,'low');
freqz function isn't working, possibly because it's not a digital filter. Could someone guide me on how I can do it.

2 comentarios

Geoff Hayes
Geoff Hayes el 28 de Mayo de 2018
Karl - please clarify what you mean by freqz function isn't working. Are there errors or something else?
Karl Rueth
Karl Rueth el 28 de Mayo de 2018
Yes it was, Freqs has to be used for analogue filters .. Thanks to Star Rider

Iniciar sesión para comentar.

 Respuesta aceptada

Star Strider
Star Strider el 28 de Mayo de 2018
Use the Signal Processing Toolbox freqs (link) function for continuous filters, or freqz (linked to at the end of that documentation) for discrete filters. You can also get the amplitude and frequency outputs.
[b,a]=butter(3,50/1000,'low');
figure
freqs(b, a)

2 comentarios

Karl Rueth
Karl Rueth el 28 de Mayo de 2018
Thanks .. It worked
Star Strider
Star Strider el 28 de Mayo de 2018
As always, my pleasure.

Iniciar sesión para comentar.

Más respuestas (0)

Preguntada:

el 28 de Mayo de 2018

Comentada:

el 28 de Mayo de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by