马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
clf reset
H=axes('unit','normalized','position',[0,0,1,1],'visible','off');
set(gcf,'currentaxes',H);
str='\fontname{隶书}归一化二阶系统的阶跃响应曲线';
text(0.12,0.93,str,'fontsize',13);
h_fig=get(H,'parent');
set(h_fig,'unit','normalized','position',[.1,.2,.7,.4]);
h_axes=axes('parent',h_fig,...
'unit','normalized','position',[.1,.15,.55,.7],...
'xlim',[0 15],'ylim',[0 1.8],'fontsize',8);
h_text=uicontrol(h_fig,'style','text',...
'unit','normalized','position',[.67,.73,.25,.14],...
'horizontal','left','string',{'输入阻尼比系数','zeta='});
h_edit=uicontrol(h_fig,'style','edit',...
'unit','normalized','position',[.67,.59,.25,.14],...
'horizontal','left','callback',...
['z=str2num(get(gcbo,''string''));',...
't=0:.1:15;','for k=1:length(z);',...
's2=tf(1,[1 2*z(k) 1]);','y(:,k)=step(s2,t);',...
'h_plot=plot(t,y(:,k));'...
'if length(z)>1 ,hold on,end,end,','hold off']);
h_push1=uicontrol(h_fig,'style','push','unit','normalized','position',[.67,.37,.12,.15],...
'string','grid on','callback',['try m=m+1;catch m=1;end,',...
'if mod(m,2)==1,grid on;set(h_push1,''string'',''grid off''),else grid off;',...
'set(h_push1,''string'',''grid on''),end']);
h_push2=uicontrol(h_fig,'style','push','unit','normalized','position',[.67,.15,.12,.15],...
'string','clear','callback',...
['ha=axis;xli=ha(2)/4;yli=ha(4)/2;',...
'try cla(h_axes);h_plot==1;clear h_plot,catch '...
'text(xli,yli,''\fontname{楷书}没有图,你耍我啊!'',''fontsize'',20,''color'',''b''),end;',...
'set(h_edit,''string'','''')']);
[ 本帖最后由 eight 于 2007-11-16 22:57 编辑 ] |