Opening matlab figures from other gui

1 回表示 (過去 30 日間)
David
David 2013 年 4 月 16 日
I have a quick question on opening up figures from other matlab GUI screens. I have the other figure and .m files in another folder and I added the path into the opening function by
folder= 'directory name' addpath (folder)
and then under my callbacks for a button I have a line:
h= guiname; open (h);
Is this the right way to go about it? I keep getting uninitialized variable errors citing the line h=guiname . Thanks in advance.

回答 (1 件)

Firzi Mukhri
Firzi Mukhri 2013 年 5 月 25 日
編集済み: Firzi Mukhri 2013 年 5 月 25 日
I'm new but I have made this possible by having all the .m and . fig file in same folder.
For example I have 3 GUI named TEST, TABLE and GRAPH in the main gui test I have 2 push button named table and graph
I just write the fig name on the button callback and it works.
function table_pb_Callback(hObject, eventdata, handles)
% hObject handle to table_pb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
TABLE
% --- Executes on button press in graph_pb.
function graph_pb_Callback(hObject, eventdata, handles)
% hObject handle to graph_pb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
GRAPH
hope i helped.

カテゴリ

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