Unable to close GUI figures

54 views (last 30 days)
Valerie Cayol
Valerie Cayol on 25 Apr 2017
Answered: Robert U on 17 Sep 2018
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 Comments
Greg
Greg on 16 Sep 2018
Does delete(h) work when close(h) does not?
Jan
Jan on 17 Sep 2018
@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.

Sign in to comment.

Answers (1)

Robert U
Robert U on 17 Sep 2018
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

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!