Run .m function from GUI
1 次查看(过去 30 天)
显示 更早的评论
I have a GUI that collects user data in the form of numbers. I want the user to hit the pushbutton in the GUI in order to run a function file(.m file) that uses the imputed data of the user to display results
My function file is dish.m
The GUI pushbutton function is this:
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
What code do i need to run.
0 个评论
采纳的回答
Image Analyst
2014-1-25
Call dish():
[out1, out2, out3] = dish(in1, in2); % or whatever arguments it has.
4 个评论
Image Analyst
2014-1-25
That's fine. You do not need to accept the values it returns if you don't plan on using them.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!