How do I make a GUI created by guide a single united function

I notice the GUIs created by Guide comes with multiple different and individual functions (opening, output, create, callbacks, uipanels etc). Each function acts individually and separately from others. How do I make all of those functions to be combined somehow and belong as nested functions to the main one?

 Accepted Answer

You cannot do that with GUIDE.
You could edit the code the GUIDE produces to make the functions nested, but if you do that then GUIDE will lose track of the functions.
You should probably examine the newer App Designer.

4 Comments

ANd if GUIDe loses track of the functions then what does it mean? I want to keep the GUI (.fig) as it is and have the absolute control of my functions (keep them as nested). How do I do that?
It means that if you went back into GUIDE then GUIDE would think that your functions do not exist and would want to generate new callbacks for them. This would lead to trouble if you wanted to edit the fig afterwards.
"I want to keep the GUI (.fig) as it is and have the absolute control of my functions"
Have GUIDE generate a .fig only. Then leave GUIDE and write your own code that uses the .fig however you want; and don't go back to GUIDE.
Sounds interesting. I can have elements like sliders, push buttons etc created by GUIDE and have the freedom to alter them as I wish. Let me try this.
ANd what about the AppDesigner? Is it better than GUIDE? I have no experience at all with AppDesigner. Can I have nested functions there? I don't see any option to generate both fig and m files in AppDesigner

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!