i want to find out area under the curve using quad command ,the curve is generated after running the programme
1 回表示 (過去 30 日間)
古いコメントを表示
clc
clear all
s=tf('s')
alpha=0.05
mu=0.05;
ztap=0;
ztaa=sqrt(3*mu/(8*(1+mu)));
omegaa=(1/(1+mu));
a1=1-alpha;
a2=2*ztaa*omegaa+2*ztap+2*ztaa*omegaa*mu;
a3=omegaa^2+4*ztap*ztaa*omegaa+mu*omegaa^2+1;
a4=2*ztap*omegaa^2+2*ztaa*omegaa;
a5=omegaa^2;
A=s^2+2*ztaa*omegaa*s+omegaa^2;
D=a1*s^4+a2*s^3+a3*s^2+a4*s+a5;
G=A/D;
bodemag(G)
After running this programme a curve is generated (bode plot) i want find out area under this curve by using quad syntax i tried to solve this many times i m very new to matlab please help me to find out the answer
回答 (1 件)
Grzegorz Knor
2012 年 11 月 7 日
If you draw yourself Bode plot (see code), you receive vectors 'x' and 'y', which can be numerically integrate.
[HMag, HPhase, HOmega] = bode(G);
HMag = squeeze(HMag);
HPhase = squeeze(HPhase);
figure
semilogx(HOmega, 20*log10(HMag),'r')
xlabel('Frequency (rad/s)')
ylabel('Magnitude (dB)')
title('Bode Diagram')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Plot Customization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!