错误:尝试引用非结构数组的字段。 Matlab GUI

时间:2014-12-09 08:45:38

标签: matlab user-interface reference

我只有在运行archive.fig时才会出错,当程序运行.m没有任何问题时,我搜索了一些网站但没有任何内容。感谢

错误:

Attempt to reference field of non-structure array.

Error in Cramer>pushbutton2_Callback (line 128)
n = str2double(get(handles.edit1,'String'));

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in Cramer (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)Cramer('pushbutton2_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating UIControl Callback

我的代码:

function pushbutton2_Callback(hObject, eventdata, handles)

n = str2double(get(handles.edit1,'String'));

num = cell(n,n);
num(:,:) = {''};
set(handles.uitable1,'Data',num);
set(handles.uitable1,'ColumnEditable',true());

num = cell(n,1);
num(:,:)={''};
set(handles.uitable2,'Data',num);
set(handles.uitable2,'ColumnEditable',true());

请帮帮我。

0 个答案:

没有答案