Calling a function without input arguments in Matlab gui
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!