24小时热门版块排行榜    

CyRhmU.jpeg
查看: 904  |  回复: 0
【悬赏金币】回答本帖问题,作者zjuagassi将赠送您 20 个金币

zjuagassi

铁杆木虫 (小有名气)

[求助] matlab gui 中参数传递的问题

用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
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 zjuagassi 的主题更新
不应助 确定回帖应助 (注意:应助才可能被奖励,但不允许灌水,必须填写15个字符以上)
信息提示
请填处理意见