Calling a function without input arguments in Matlab gui

3 ビュー (過去 30 日間)
akshay raj
akshay raj 2015 年 2 月 9 日
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 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by