|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
想读入的excel:
Leq L5 L10 L50 L90 L95 Lmax Lmin SD
60.3 61.6 61.1 60.3 59.5 59.2 62.5 58.4 0.7
68.3 70.7 70.1 68.0 65.8 64.6 75.6 63.9 1.9
70.3 71.9 71.6 70.0 68.3 68.1 74.0 66.7 1.2
68.3 71.0 70.5 68.1 64.5 64.0 72.5 62.7 2.1
69.7 72.7 72.3 68.0 65.3 64.8 76.1 64.2 2.6
70.0 72.3 71.2 70.2 67.8 67.7 74.9 67.2 1.4
67.6 68.8 68.6 67.6 66.4 66.1 69.8 65.6 0.8
65.6 69.2 68.0 64.4 63.1 62.7 74.0 62.6 2
61.4 62.2 62.1 61.3 60.8 60.7 62.6 60.1 0.5
68.8 71.6 71.3 67.5 66.8 66.7 75.0 66.2 1.7
GUI中m 文件相关语句:
function pushbutton1_Callback(hObject, eventdata, handles)
clc
[fname1,pname1]=uigetfile('*.xls');
set(handles.edit1,'String',pname1);
set(handles.edit2,'String',fname1);
if fname1~=0
[a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 ]=textread(fname1,'%f %f %f %f %f %f %f %f %f %f ','headerlines',1);
end
X1=[a1 a2 a3 a4 a5 a6 a7 a8 a9];
出错信息如下:
??? Trouble reading floating point number from file (row 1, field 1) ==> �
Error in ==> C:\MATLAB6p5\toolbox\matlab\iofun\dataread.dll
Error in ==> C:\MATLAB6p5\toolbox\matlab\iofun\textread.m
On line 172 ==> [varargout{1:nlhs}]=dataread('file',varargin{:});
Error in ==> C:\MATLAB6p5\work\DPFORSLM.m (pushbutton1_Callback)
On line 47 ==> [a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 ]=textread(fname1,'%f %f %f %f %f %f %f %f %f %f ','headerlines',1);
Error in ==> C:\MATLAB6p5\toolbox\matlab\uitools\gui_mainfcn.m
On line 66 ==> feval(varargin{:});
Error in ==> C:\MATLAB6p5\work\DPFORSLM.m
On line 22 ==> gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback. |
|