필터 지우기
필터 지우기

producing the magnitude of the butterworth graph

조회 수: 3 (최근 30일)
u-will-neva-no
u-will-neva-no 2012년 1월 22일
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

채택된 답변

bym
bym 2012년 1월 22일
replace your plot(...) with
semilogx(frequency,mag);
semilog does its own plotting

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by