📄 fig525.m
字号:
% Generates Fig 5.25% Computer Controlled Systems (3rd ed)% Author: B. Wittenmark% Last edit: 1997-07-04% Copyright (c) 1996 by K. J. 舠tr鰉, B. Wittenmark and% Department of Automatic Control, Lund Institute of% Technology, Lund, Swedennewplot;set(gcf,'PaperUnits','centimeters','PaperPosition',[2 2 13 10])set(gcf,'Units','centimeters','position',get(gcf,'PaperPosition'))block525;lw=0.9;J1=10/9;J2=10;k=1;d=0.1;kI=1;om0=sqrt(k*(J1+J2)/(J1*J2));al=J1/(J1+J2);be1=d/(J1*om0);be2=d/(J2*om0);ga=kI/(J1*om0);de=1/(J1*om0);h=0.5;omf=2;r1=-2.0095251;r2=1.6353356;r3=-0.63529099;r4=0.10539691;r5=0;s0=1.9207519;s1=-4.7306366;s2=4.7691955;s3=-2.1822977;s4=0.45055132;s5=0;t0=1.9207519;t1=-4.7306366;t2=4.7691955;t3=-2.1822977;t4=0.45055132;t5=0;clf;%[t,x,y]=sim('block525',[0, 80]);subplot(3,1,1);plot(t,y(:,3),'k--',t,y(:,1),'k','Linew',lw);axis([0,80,0,1.5]);set(gca,'FontSize',9,'Fontname','NewCenturySchlbk')set(gca,'xtick',[0 40 80]);set(gca,'ytick',[0 1]);ylabel('Output','Fontname','NewCenturySchlbk','Fontsize',9)%title(['Fig 5.25']);drawnow;%subplot(3,1,2);[ts,ys]=stairs(t,y(:,2));plot(ts,ys,'m','Linew',lw);axis([0,80,-1,2]);set(gca,'FontSize',9,'Fontname','NewCenturySchlbk')set(gca,'xtick',[0 40 80]);set(gca,'ytick',[-1 0 1 2]);ylabel('Input','Fontname','NewCenturySchlbk','Fontsize',9)xlabel('Time','Fontname','NewCenturySchlbk','Fontsize',9)drawnow;%ylblalgn;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -