📄 fg_06_07.m
字号:
% fg_06_07 Analog Butterworth and Chebyshev power gain.
wc=1;
L=[2 4 6];
dB0=[-40 -80 -120];
w1=[10 10 10];
dBs=[-40 -80 -120];
txb=[7 6.5 6];
txc=[6.5 5.5 5.2];
w=linspace(0,w1(plt),500);
sp_fig(1,9,6);
for plt=1:3,
% Butterworth
PBut=1./(1+w.^(2*L(plt)));
dBBut=10*log10(max(10^(dB0(plt)/10),PBut));
% Chebyshev.
ws=wc*cosh((6.02-dBs(plt))/(8.69*L(plt)));
VL0=cosh(L(plt)*acosh(ws/wc));
VL=cosh(L(plt)*acosh(ws./max(1.e-20,w)));
P=1./(1+(VL0^2)./(VL.^2));
dBCheb=10*log10(max(10^(dB0(plt)/10),P));
% Plot.
subplot(1,3,plt);
axis([0 w1(plt) dB0(plt) 0]);
set(gca,'fontsize',16);
line(w,dBCheb,'color','r');
line(w,dBBut,'color','b'); grid;
if(plt==1)
ylabel('Power gain in dB');
elseif(plt==2)
xlabel('Frequency in rad/s');
end
title(['L=',int2str(L(plt))]);
h(1)=text(txb(plt),dBBut(round(500*txb(plt)/w1(plt))),'B');
h(2)=text(txc(plt),dBCheb(round(500*txc(plt)/w1(plt))),'C');
set(h,'fontsize',18);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -