Calling a function without input arguments in Matlab gui
2 次查看(过去 30 天)
显示 更早的评论
I am new to Matlab, I want to call a function in different GUI without sending any arguments( from one GUI to another GUI).
Example:
gui1.m (in GUIDE)
function some_ui_OpeningFun(hObject, eventdata, handles, varargin)
a = 10;
setappdata(0,'a',a);
gui2('pushbutton1_Callback'...) %<- to call the function in the second gui
handles.output = hObject;
guidata(hObject, handles);
gui2.m (in GUIDE)
function pushbutton1_Callback(hObject, eventdata, handles)
b = getappdata(0,'a');
disp(a);
so i want to call the function pushbutton1_Callback from gui2.m.
I have tried using gui2('pushbutton1_callback',handles,.....) which was give in the GUID comments. But could't get it.
Can anyone tell me how to do so?
thanks in advance.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!