Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#3 |
初级会员
注册日期: 2007-06-12
帖子: 16
声望力: 18 ![]() |
![]()
看看这个程序就会理解的:
str1= ' 信号延迟(s) =' ; htext=uicontrol(gcf, 'style' , 'text' , ... % 制作静态说明文本框 'foregroundcolor','k','backgroundcolor',[0.3 0.8 0.6],'fontname','行书','fontsize' ,10,'position' ,[0.56,0.085,0.22,0.06], ... 'string' ,[str1,sprintf( '%1.4g' ,t0)]); hslider=uicontrol(gcf, 'style' , 'slider' , ... % 创建滑动键 'position' ,[0.56,0.06,0.22,0.05], ... 'max' ,2, 'min' ,-2, ... 'sliderstep' ,[0.01,0.05], ... 'Value' ,0); set(hslider, 'callback' ,[ ... % 操作滑动键 , 引起回调 't0=get(gcbo,''value'');' , ... % 获得滑动键状态值 'other(htext,str1,t0,htext1,str2,w0,h_axes3,h_axes4)' ]); % 被回调的函数文件 |
![]() |
![]() |