马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
程序代码如下,运行时总是报错,请高手帮忙看看。
- function shili351
- h0=figure('toolbar','none',...
- 'position',[198 56 350 300],...
- 'name','shili35');
- h1_edit=uicontrol(gcf,'style','edit',...
- 'position',[100 200 100 50],...
- 'HorizontalAlignment','left',...
- 'string','请输入英文字母',...
- 'callback','f=get(h1_edit,''string'');'...
- );
- h2_edit=uicontrol(gcf,'style','edit',...
- 'HorizontalAlignment','left',...
- 'position',[100 100 100 50]...
- );
- huidiao1=[...
- 'g=upper(f);,',...
- 'set(h2_edit,''string'',g),'...
- ];
- huidiao2=[...
- 'g=lower(f);,',...
- 'set(h2_edit,''string'',g),'...
- ];
- h1_button=uicontrol(gcf,'style','pushbutton',...
- 'string','小写变大写',...
- 'position',[100 45 100 20],...
- 'callback',huidiao1);
- h2_button=uicontrol(gcf,'style','pushbutton',...
- 'string','大写变小写',...
- 'position',[100 20 100 20],...
- 'callback',huidiao2);
复制代码
错误信息
??? Undefined function or variable 'h1_edit'.
??? Error while evaluating uicontrol Callback.
??? Undefined function or variable 'f'.
??? Error while evaluating uicontrol Callback.
|