matlab实例33

matlab实例33

ID:40569196

大小:100.00 KB

页数:31页

时间:2019-08-04

matlab实例33_第1页
matlab实例33_第2页
matlab实例33_第3页
matlab实例33_第4页
matlab实例33_第5页
资源描述:

《matlab实例33》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、实例33:曲线转换按钮h0=figure('toolbar','none',...   'position',[200150450250],...   'name','实例33');x=0:0.5:2*pi;y=sin(x);h=plot(x,y);gridonhuidiao=[...   'ifi==1,',...   'i=0;,',...   'y=cos(x);,',...   'delete(h),',...   'set(hm,''string'',''正弦函数''),',...   'h=plot(x,y);,',... 

2、  'gridon,',...   'elseifi==0,',...   'i=1;,',...   'y=sin(x);,',...   'set(hm,''string'',''余弦函数''),',...   'delete(h),',...   'h=plot(x,y);,',...   'gridon,',...   'end,',...   'end'];hm=uicontrol(gcf,'style','pushbutton',...   'string','余弦函数',...   'callback',huidiao);

3、i=1;set(hm,'position',[250206020]);set(gca,'position',[0.20.20.60.6])title('按钮的使用')holdon实例34:栅格控制按钮h0=figure('toolbar','none',...   'position',[200150450250],...   'name','实例34');x=0:0.5:2*pi;y=sin(x);plot(x,y)huidiao1=[...       'set(h_toggle2,''value'',0),',...       

4、'gridon,',...       ];huidiao2=[...       'set(h_toggle1,''value'',0),',...       'gridoff,',...       ];h_toggle1=uicontrol(gcf,'style','togglebutton',...   'string','gridon',...   'value',0,...   'position',[20455020],...   'callback',huidiao1);h_toggle2=uicontrol(gcf,

5、'style','togglebutton',...   'string','gridoff',...   'value',0,...   'position',[20205020],...   'callback',huidiao2);set(gca,'position',[0.20.20.60.6])title('开关按钮的使用')实例35:编辑框的使用h0=figure('toolbar','none',...   'position',[200150350250],...   'name','实例35');f='Pleasein

6、puttheletter';huidiao1=[...       'g=upper(f);,',...       'set(h2_edit,''string'',g),',...   ];huidiao2=[...       'g=lower(f);,',...       'set(h2_edit,''string'',g),',...   ];h1_edit=uicontrol(gcf,'style','edit',...   'position',[10020010050],...   'HorizontalAlignmen

7、t','left',...   'string','Pleaseinputtheletter',...   'callback','f=get(h1_edit,''string'');',...   'background','w',...   'max',5,...   'min',1);h2_edit=uicontrol(gcf,'style','edit',...   'HorizontalAlignment','left',...   'position',[10010010050],...   'background','w'

8、,...   'max',5,...   'min',1);h1_button=uicontrol(gcf,'style','pushbutton',...   'string','小写变大写',...  

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。