How to communicate two matlab gui?
Show older comments
Hello, I am creating a maingui and subgui. There is push button in the maingui after clicking it I want to open subgui and then in subgui there is edittext box in which I want to put value after putting the value I want to close that window and want to use that editbox value in the main gui and want to display the calculation under pushbutton of maingui into another textbox. Can anyone suggest the solution using example? Thanks..!!
5 Comments
The MATLAB documentation clearly explains how to pass data between callbacks, and it has examples:
and it also has clear explanations of how to pass data between workspaces:
My favorite is to use nested functions: simple, intuitive, fast, efficient.
Adam
on 31 Jan 2017
Here was a similar discussion in the past where I detailed my preferred solution for GUI communication
For this case though, if it is as simple as you say then the simple methods used in the documentation work fine, most particularly uiwait with uiresume and a modal second GUI so that you have to respond in that GUI, then it will close and only then can you do anything back in the main GUI again.
My solution is for the more general approach of two GUIs communicating where you do not necessarily wish to have to do everything in the 2nd GUI and close it down before you can do anything in the main GUI.
VISHWAS CHAVAN
on 31 Jan 2017
Adam
on 31 Jan 2017
That page is full of examples. What are you expecting us to do? Spend our whole morning copying it out from there to here?
VISHWAS CHAVAN
on 1 Feb 2017
Accepted Answer
More Answers (0)
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!