下面黄色字删掉,可以运行,而存在的话点open后提示变量未定义。
function test()
clf reset;
%[Data,Test] = xlsread('d:\matlab\work\ZirconHf.exp','A1:J501'); %read in excel data
%[filename, pathname] = uigetfile;
%if (filename==0 & pathname==0)
% msgbox('您没有选择文件,请重新选择!','打开文件出错','error');
% break;
%else
%Data=xlsread([pathname, filename]);
% 然后把从计算机其它文件夹读取的数据文件保存到当前文件夹
% save NumericalDatum.dat NumericalDatum -ascii;
% xlswrite('NumericalDatum.xls',NumericalDatum);
% msgbox('打开及读取数据完毕!','确认','warn');
%end
set(gcf,'unit','normalized','position',[0.1,0.2,0.64,0.35]);
set(gcf,'defaultuicontrolunits','normalized');
set(gcf,'defaultuicontrolfontsize',12);