|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
<P>clf reset<BR>H=axes( 'unit' , 'normalized' , 'position' ,[0,0,1,1], 'visible' , 'off' );<BR>set(gcf, 'currentaxes' ,H);<BR>str= '\fontname{ 隶书 } 如图 ' ;<BR>text(0.12,0.93,str, 'fontsize' ,13);<BR>h_fig=get(H, 'parent' );<BR>set(h_fig, 'unit' , 'normalized' , 'position' ,[0.1,0.2,0.7,0.4]);<BR>h_axes=axes( 'parent' ,h_fig, ...<BR>'unit' , 'normalized' , 'position' ,[0.1,0.15,0.55,0.7], ...<BR>'xlim' ,[0 15], 'ylim' ,[0 1.8], 'fontsize' ,8); </P>
<P>h_text1=uicontrol(h_fig, 'style' , 'text' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.8,0.1,0.10], ...<BR>'horizontal' , 'left' , 'string' ,{ ' 输入t1 ' , 't1 ='});<BR>h_edit1=uicontrol(h_fig, 'style' , 'edit' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.7,0.1,0.10], ...<BR>'horizontal' , 'left' , ...<BR>'callback' ,[ ...<BR>'z=str2num(get(gcbo,''string''));' , ...<BR>'t=0:0.1:15;' , ...<BR>'for k=1:length(z);' , ...<BR>'s2=tf(1,[1 2*z(k) 1]); ' , ...<BR>'y(:,k)=step(s2,t);' , ...<BR>'plot(t,y(:,k));' , ...<BR>'if (length(z)>1) ,hold on,end,' , ...<BR>'end;' , ...<BR>'hold off,' ]); </P>
<P>h_text2=uicontrol(h_fig, 'style' , 'text' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.6,0.1,0.10], ...<BR>'horizontal' , 'left' , 'string' ,{ ' 输入t2 ' , 't2 ='});<BR>h_edit2=uicontrol(h_fig, 'style' , 'edit' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.50,0.1,0.10], ...<BR>'horizontal' , 'left' , ...<BR>'callback' ,[ ...<BR>'z=str2num(get(gcbo,''string''));' , ...<BR>'t=0:0.1:15;' , ...<BR>'for k=1:length(z);' , ...<BR>'s2=tf(1,[1 2*z(k) 1]); ' , ...<BR>'y(:,k)=step(s2,t);' , ...<BR>'plot(t,y(:,k));' , ...<BR>'if (length(z)>1) ,hold on,end,' , ...<BR>'end;' , ...<BR>'hold off,' ]); </P>
<P>h_text3=uicontrol(h_fig, 'style' , 'text' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.4,0.1,0.10], ...<BR>'horizontal' , 'left' , 'string' ,{ ' 输入t3 ' , 't3 ='});<BR>h_edit3=uicontrol(h_fig, 'style' , 'edit' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.3,0.1,0.10], ...<BR>'horizontal' , 'left' , ...<BR>'callback' ,[ ...<BR>'z=str2num(get(gcbo,''string''));' , ...<BR>'t=0:0.1:15;' , ...<BR>'for k=1:length(z);' , ...<BR>'s2=tf(1,[1 2*z(k) 1]); ' , ...<BR>'y(:,k)=step(s2,t);' , ...<BR>'plot(t,y(:,k));' , ...<BR>'if (length(z)>1) ,hold on,end,' , ...<BR>'end;' , ...<BR>'hold off,' ]); </P>
<P><BR>h_text4=uicontrol(h_fig, 'style' , 'text' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.2,0.1,0.10], ...<BR>'horizontal' , 'left' , 'string' ,{ ' 输入t4 ' , 't4 ='});<BR>h_edit4=uicontrol(h_fig, 'style' , 'edit' , ...<BR>'unit' , 'normalized' , 'position' ,[0.8,0.1,0.1,0.10], ...<BR>'horizontal' , 'left' , ...<BR>'callback' ,[ ...<BR>'z=str2num(get(gcbo,''string''));' , ...<BR>'t=0:0.1:15;' , ...<BR>'for k=1:length(z);' , ...<BR>'s2=tf(1,[1 2*z(k) 1]); ' , ...<BR>'y(:,k)=step(s2,t);' , ...<BR>'plot(t,y(:,k));' , ...<BR>'if (length(z)>1) ,hold on,end,' , ...<BR>'end;' , ...<BR>'hold off,' ]); </P>
<P>h_push1=uicontrol(h_fig, 'style' , 'push' , ...<BR>'unit' , 'normalized' , 'position' ,[0.67,0.37,0.12,0.15], ...<BR>'string' , 'grid on' , 'callback' , 'grid on' );<BR>h_push2=uicontrol(h_fig, 'style' , 'push' , ...<BR>'unit' , 'normalized' , 'position' ,[0.67,0.15,0.12,0.15], ...<BR>'string' , 'grid off' , 'callback' , 'grid off' ); <BR></P> |
|