Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-05-03
年龄: 46
帖子: 10
声望力: 18 ![]() |
![]()
gui界面的回调函数怎样写呀
|
![]() |
![]() |
![]() |
#2 |
初级会员
注册日期: 2008-05-03
年龄: 46
帖子: 10
声望力: 18 ![]() |
![]()
请各位daxia告诉我一下
|
![]() |
![]() |
![]() |
#3 |
初级会员
注册日期: 2008-05-04
年龄: 39
帖子: 11
声望力: 18 ![]() |
![]()
就在Callback里面写啊。
|
![]() |
![]() |
![]() |
#4 |
初级会员
注册日期: 2008-04-28
年龄: 39
帖子: 3
声望力: 0 ![]() |
![]()
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',[0.1,0.2,0.7,0.4]); h_axes=axes('parent',h_fig,... 'unit','normalized','position',[0.1,0.15,0.55,0.7],... 'xlim',[0 15],'ylim',[0 1.8],'fontsize',8); h_text=uicontrol(h_fig,'style','text',... 'unit','normalized','position',[0.67,0.73,0.25,0.14],... 'horizontal','left','string',{'输入阻尼比系数','zeta ='}); h_edit=uicontrol(h_fig,'style','edit',... 'unit','normalized','position',[0.67,0.59,0.25,0.14],... 'horizontal','left',... 'callback',[... 'z=str2num(get(gcbo,''string''));',... %这里的‘’string'' 的引号是2个单引号组成的‘ ‘string' ' 't=0:0.1:15;',... 'for k=1:length(z);',... 's2=tf(1,[1 2*z(k) 1]); ',... 'y(:,k)=step(s2,t);',... 'plot(t,y(:,k));',... 'if (length(z)>1) ,hold on,end,',... 'end;',... 'hold off,']); h_push1=uicontrol(h_fig,'style','push',... 'unit','normalized','position',[0.67,0.37,0.12,0.15],... 'string','grid on','callback','grid on'); h_push2=uicontrol(h_fig,'style','push',... 'unit','normalized','position',[0.67,0.15,0.12,0.15],... 'string','grid off','callback','grid off'); |
![]() |
![]() |
![]() |
主题工具 | |
显示模式 | |
|
|
![]() |
||||
主题 | 主题作者 | 版面 | 回复 | 最后发表 |
[求助]Figure中的曲线数据怎么传到workspace里? | leijing2009 | MATLAB论坛 | 1 | 2008-06-09 22:12 |
[求助]用fsolve求解非线性方程的问题 | 心际依然 | MATLAB论坛 | 5 | 2008-04-17 09:45 |