필터 지우기
필터 지우기

matlab GUIs

조회 수: 1 (최근 30일)
ammara AMMARA
ammara AMMARA 2012년 4월 25일
I have a main GUI from which I can open several sub GUIs. I need to write a code such that when I open the sub GUIs, first sub GUI should be closed when I open the second sub GUI but the main GUI should remain open. Can anyone help me out with the code?

채택된 답변

Jakob Sørensen
Jakob Sørensen 2012년 4월 25일
Hmm, maybe 'findobj' could work. I tried some code that seemed to work:
% Find all figures
list_of_figs = findobj('type','figure');
% The latest opened figure, should be in the end of the list.
sub_fig = list_of_figs(end);
% Close the figure
close(sub_fig);
Or you could open you sub GUI's using the same name for all of them (since you won't have more than one open at a time anyway), and then just use close(sub_fig_name).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by