MATLAB: How to close a figure and make the rest of the code run

isopen

Hello everyone, I think I have an easy question but I don't know exactly how to execute it.
My code starts executing a GUI which opens a Figure where I have to visualize certain images. I want that when I finish my visualization and close this Figure (GUI), the rest of my code continues.
I think it should be something like:
GUI
while Figure isopen
%something
end
RestOfMyCode
or am I wrong?
Thank you so much for your help!

Best Answer

uiwait(Figure_Handle)