Unable to close GUI figures

조회 수: 42 (최근 30일)
Valerie Cayol
Valerie Cayol 2017년 4월 25일
답변: Robert U 2018년 9월 17일
I am using a linux Ubuntu 16.0. I just installed the latest matlab version, R2017a.
For some reason since I upgraded matlab I am unable to close figures opened using the GUI, whatever the closing method: - using x-signed button in the right upper corner) - close 'name' where the name is the one indicated when opening the figure; - using close figure handle after determination of the figure handle with fh=findall(0,'Type','Figure')
Strangely, all these methods clear the variables associated with the figure but the figure remains visible.
The only way for me to get rid of the figure is through "close all force". Before I switched to this newer matlab version everything worked fine.
Does anyone has an idea of a solution ?
Thank you
  댓글 수: 4
Greg
Greg 2018년 9월 16일
Does delete(h) work when close(h) does not?
Jan
Jan 2018년 9월 17일
@Schuyler: Please explain, which problem you have with details. The OP Valerie Cayol explained only what does not work, but did not mention, what happens instead. Maybe an error message occurs? Or Matlab fails in the CloseRequestFcn?
all these methods clear the variables associated with the figure
It is not clear, what "variables associated with the figure means. There is no associating between variables and GUI objects.
In consequence the description of the problem is not clear. So why do you assume, that you the same one?
Please open a new thread and post more details.

댓글을 달려면 로그인하십시오.

답변 (1개)

Robert U
Robert U 2018년 9월 17일
Hi Valerie Cayol,
I had a similar problem while closing figures. I started to use the pause()-command after close()-command.
I use GUI as container for all handles within my figure, including the figure handle fh.
GUI.fh.delete;
pause(0.01)
That solved my problem. Figure is closed before the callback function is terminated.
Kind regards,
Robert

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by