用m文件建GUI界面,在inputbutton 中输入数据,传递给outputbutton,利用该数据。为什么总显示参数不够错误?
错误提示如下:
Fresnel_GUI1
输入参数的数目不足。
出错 Fresnel_GUI1/OutputButton_Callback (line 52)
t1=handles.coefFunc;
计算 UIControl Callback 时出错
程序为:
hInputFunc = uicontrol('Style','pushbutton',...
'String','Input_Function','Position',[315,100,70,25],...
'Callback',@InputFuncButton_Callback);
hOutput = uicontrol('Style','pushbutton',...
'String','Output','Position',[315,140,70,25],...
'Callback',@OutputButton_Callback);
function InputFuncButton_Callback(hObject,eventdata,handles)
handles.coefFunc=xlsread('Func.xls');
guidata(hObject,handles);
% handles.scope=xlsread('Scope.xls');
% guidata(hObject,handles);
end
function OutputButton_Callback(hObject,eventdata,handles)
t1=handles.coefFunc;
% t2=hangles.scope;
% guidata(hObject,handles);
end