producing the magnitude of the butterworth graph

2 visualizaciones (últimos 30 días)
u-will-neva-no
u-will-neva-no el 22 de En. de 2012
Hello everyone, I am trying to write some matlab code to show the magnitude of the butterworth equation of order 2.
The equation is: T(s) = 1/(s^2 + sqrt(2) +1.
Here is my matlab code: [code] %magnitude of butterworth filter characteristic frequency = 0.1:0.1:100;
w = 2*pi*frequency; s = j*w; butterworth = 1./(s.^2 + sqrt(2).*s +1); mag = abs(butterworth); plot(semilogx(freq),mag); [/code]
I want a range of frequencies from 0.1 to 100 rad/s and used the semilogx() function so that the x axis would have powers such as 10^0, 10^1 etc...
The graph is not correct however and I can not see what is wrong with it.
Thank you in advance

Respuesta aceptada

bym
bym el 22 de En. de 2012
replace your plot(...) with
semilogx(frequency,mag);
semilog does its own plotting

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by