MATLAB: How to manage more than one GUI ie main GUI and sub GUI

guiguidemain guisub-gui

Hi all , Suppose i have two GUI's , one is main GUI and the other is sub gui . So i start my work on main GUI and in between , i call sub gui . The sub gui performs a few tasks . But then i want to return to the next line of code of main GUI exactly after the line where i had called the sub gui so that i can continue with the tasks on the main GUI . I have come to know about the inputdlg option but i dont want to just accept input from the users . So i dont want to use inputdlg but i want another user created gui as sub gui where the user can do certain things .
I am learning matlab. So do let me know if such a thing is not possible. And if possible , then plz do try to explain in simple language

Best Answer

doc uiwait
doc uiresume
These are what you need if you want a 2nd UI to have focus and for the main program that launched it to wait until the launched GUI closes and focus is returned to the main GUI.
The help should contain examples of this.
Also look at the 'WindowStyle' property of your 2nd figure. Often you will want to make this 'modal' to not allow the user to interact with the other window while the 2nd figure is active.