|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
- clf
- %
- zeta2=[0.2 0.4 0.6 0.8 1.0];n=length(zeta2);
- for k=1:n;Num{k,1}=1;Den{k,1}=[1 2*zeta2(k) 1];end
- S=tf(Num,Den);
- t=(0:0.4:20)';
- [Y,x]=step(S,t);
- tt=t*ones(size(zeta2));
- %
- clf reset,H=axes('Position', [0, 0, 1, 1], 'Visible', 'off');
- %
- str{1}='\fontname{隶书}二阶系统阶跃响应'; %<11>
- str{2}='y(t) = 1 - \beta^{-1}e^{-\zetat}sin(\betat + \theta)';
- str{3}=' ';str{4}='\fontname{隶书}其中:';
- str{5}='\beta = (1 - \zeta^{2})^{0.5}';
- str{6}='\theta = arctg(\beta/\zeta)';
- str{7}='\zeta = .2, .4, .6, .8, 1'; %<15>
- %
- set(gcf, 'CurrentAxes',H) %<18>
- text(0.01, 0.73, str, 'FontSize', 12) %<19>
- h1=axes('Position', [0.45, 0.45, 0.5, 0.5]);
- ribbon(tt,Y,0.4)
- %
- set(h1,'XTickLabelMode','manual','XTickLabel','0|0.4|0.8|1.2');%<23>
- set(h1,'ZTickLabel','0|1.0|2.0'); %<24>
- %
- set(get(h1,'XLabel'),'String','\zeta \rightarrow','Rotation',17.5)
- set(get(h1,'YLabel'),'String','\leftarrow t','Rotation',-25) %<27>
- set(get(h1,'Zlabel'),'String','y \rightarrow')
- h2=axes('Position',[0.03, 0.08, 0.27, 0.27]);%
- plot(tt,Y) %
- %
- h3=axes('Position',[0.37,0.04,0.63,0.32]); %
- set(h3,'Xlim',[0,1.2],'Ylim',[0,0.5]) %
- set(h3,'DataAspectRatio',[1 1 1]) %
- set(h3,'ColorOrder',[0,0,0]) %
- set(h3,'Visible','off') %
- hh1=rectangle('Position',[0.5,0.2,0.4,0.2],'Curvature',[0,0]);
- % <37>
- hh2=rectangle('Position',[0.2,0.26,0.08,0.08],'Curvature',[1,1]);
- % <38>
- xx1=0.05:0.01:0.2;xx2=0.28:0.02:0.5;
- xx3=0.9:0.02:1.1;xx4=0.24:0.02:1;
- yy5=0.1:0.02:0.26;yy6=0.1:0.02:0.3;
- yy1=0.3*ones(size(xx1));yy2=0.3*ones(size(xx2));
- yy3=0.3*ones(size(xx3));yy4=0.1*ones(size(xx4));
- xx5=0.24*ones(size(yy5));xx6=ones(size(yy6));
- line(xx1,yy1);line(xx2,yy2);line(xx3,yy3);line(xx4,yy4);
- line(xx5,yy5);line(xx6,yy6)
- line(0.17,0.3,'Marker','>','MarkerFaceColor','k')
- line(0.47,0.3,'Marker','>','MarkerFaceColor','k')
- line(1.1,0.3,'Marker','>','MarkerFaceColor','k')
- line(0.24,0.23,'Marker','^','MarkerFaceColor','k')
- line(0.17,0.35,'Marker','+')
- text(0.27,0.23,'-')
- text(0.05,0.35,'u(t)')
- text(1,0.35,'y(t)')
- text(0.6,0.26,'s{^2} + 2{\zeta}s');
- xx7=0.56:0.02:0.84;yy7=0.3*ones(size(xx7));line(xx7,yy7)
- text(0.68,0.35,'1')
复制代码
[ 本帖最后由 suffer 于 2006-10-9 19:45 编辑 ] |
|