MATLAB: How do you set the visibility of a GUI window to ‘Off’ through code

callbackguiguide

Hi! I used GUIDE to make a GUI, once I'm done inputting data in the first window, I run another window for the next step. My problem is that the first window is still showing. How do I turn the visibility of the first window off, when I press the button going to the second window? I know I should put it in my pushbutton Callback function. I've tried using setappdata(gcf, 'Visible', 'Off') and it didn't work.

Best Answer

set(gcf, 'Visible', 'Off')