MATLAB里出现Error: The input character is not valid in MATLAB s...
发布网友
发布时间:2024-09-30 04:30
我来回答
共1个回答
热心网友
时间:2024-10-14 03:25
clf reset
global z a score
H=axes('unit','normalized','position',[0,0,1,1],'visible','off');
set(gcf,'currentaxes',H);
set(gcf,'defaultuicontrolunits','normalized');
set(gcf,'defaultuicontrolfontsize',11);
set(gcf,'menubar','none');
str1='绩点学分计算系统';
set(gcf,'name',str1,'numbertitle','off');
h=dialog('name','Hello~','position',[0.42,0.30,0.18,0.12]);
uicontrol('style','text','position',[0.06,0.06,0.06,0.04],'fontsize',9,...
'parent',h,'string','欢迎使用绩点学分计算系统!');
uicontrol('position',[0.08,0.04,0.03 0.02],'fontsize',10,'parent',h,...
'string','确定','callback','delete(gcf)');
colormenug=uimenu(gcf,'label','文件(&F)');
colormenun=uimenu(gcf,'label','辅助功能(&E)');
colormenuh=uimenu(gcf,'label','帮助(&H)');
uimenu(colormenug,'label','打开文件','callback',...
['[str11,str12]=uigetfile(''*.*'',''choosefile'');' 'a=[str12,str11];z=a;' 'set(h_edit,''string'',a);'])
uimenu(colormenuh,'label','显示当前处理文件的位置(&L)',...
'callback','set(h_edit1,"string",z)');
uimenu(colormenug,'label','退出系统','callback','close;clear');
uimenu(colormenun,'label','添加M函数到工程','callback','edit');
改好了,有弹出选择文件的对话框。
但是你程序里还有其他问题,你的h_edit句柄都没有定义,但是你却用了。下面的h_edit1句柄也一样