📄 fig712.m
字号:
% Generates Bodediagram of 6th order Bessel filter and timedelay% Generates Fig 7.12% Computer Controlled Systems (3rd ed)% Author: B. Wittenmark% Last edit: 1997-07-05% Copyright (c) 1996 by K. J. 舠tr鰉, B. Wittenmark and% Department of Automatic Control, Lund Institute of% Technology, Lund, Swedennewplot;clf;set(gcf,'PaperUnits','centimeters','PaperPosition',[2 2 13 9.5])set(gcf,'Units','centimeters','position',get(gcf,'PaperPosition'))lw=0.9;z1=0.49;om1=1.90;z2=0.82;om2=1.69;z3=0.98;om3=1.61;b=om1*om1*om2*om2*om3*om3;a=conv([1 2*z1*om1 om1*om1],[1 2*z2*om2 om2*om2]);a=conv(a,[1 2*z3*om3 om3*om3]);clf;hold onw1=logspace(-1,1);[mag1,ph1,w1]=bode(b,a,w1);ph2=-w1*2.7*360/(2*pi);subplot(2,1,1)loglog(w1,mag1,'m-','Linew',lw)axis([0.1 10 0.001 2])hold onplot([0.1 10],[1 1],'k--','Linew',lw)set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk');set(gca,'ytick',[0.01 1]);set(gca,'xtick',[0.1 1 10]);ylabel('Gain','Fontname','NewCenturySchlbk','Fontsize',9)subplot(2,1,2);semilogx(w1,ph1,'m-',w1,ph2,'k--','Linew',lw)hold onaxis([0.1,10,-500,0]);set(gca,'Fontsize',9,'Fontname','NewCenturySchlbk');set(gca,'xtick',[0.1 1 10]);set(gca,'ytick',[-360 -180 0]);xlabel('Frequency, rad/s','Fontname','NewCenturySchlbk','Fontsize',9)ylabel('Phase','Fontname','NewCenturySchlbk','Fontsize',9)%fr2=frc(1,1,2.7,-1,1);%scale=[-1 1 -3 0 -500 0];%bopl(fr1,fr2,scale);drawnow;ylblalgn;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -