calling one GUI from another GUI?
조회 수: 9 (최근 30일)
이전 댓글 표시
hey!!
i am trying to call one gui from another gui using this code for the push buttons suppose from GUI_1 i have to call GUI_2
pushbutton1_Callback(GUI_2);
GUI_2.m;
errordlg('Ok the call back is linked');
its working for one of the gui's but not for the other. this is the error which m getting
*Error in sample>pushbutton2_Callback (line 94)
pushbutton2_Callback(start_gui_single_mode);
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in sample (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)sample('pushbutton2_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback*
for the source code please refer:
i am new to matlab, please help!!
댓글 수: 2
Jan
2013년 5월 6일
This is the part of the error message, which explaines where the problem occurred. But the part is missing, which tells what the error is.
Jan
2013년 5월 6일
The reference to page, which contains about 24 links, is not helpful. Of course the readers of this forum will not read all of them to find out more.
답변 (1개)
Jan
2013년 5월 6일
You call a function by using its name without file extension:
GUI_2; % Instead of: GUI_2.m;
I'm not sure if this causes your problem, but it is at least not correct.
댓글 수: 11
Le Dung
2018년 12월 26일
편집: Le Dung
2018년 12월 26일
dear Jan
I have two GUI , one is vefrf, and other is Printedit. i saved at the desktop
I want to open GUI Printedit when use a push button.
I used command: (as you recommanded above)
Printedit;
in function Callback of push buttoon in GUI 1. And, it worked fine.
And then, i cut all file (m.file and fig.file of two GUIs to a E:\ ....(not is C:\)
And, now, when i run GUI, click on push button in GUI 1, Matlab didn't open GUI 2.
Why ???????
Please help me!
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!