i want to find out area under the curve using quad command ,the curve is generated after running the programme
1 view (last 30 days)
Show older comments
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
Answers (1)
Grzegorz Knor
on 7 Nov 2012
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 Comments
See Also
Categories
Find more on Plot Customization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!