Getting output from an app into the calling workspace
44 views (last 30 days)
Show older comments
I have a MatLAB script that runs fine. I want to add a GUI at the front of the app to make it easier for the user. I am using appdesigner for the GUI. The MatLAB script calls the app at the beginning. This part works ok. The app lets the user select an entry, a number from a drop down list, and store it in the app's workspace in a variable called numSelect. The drop down list is populated fine and when I select an entry from the drop down list it is stored fine in numSelect. I cannot figure out how to get the selected number, numSelect, from the app's workspace into the workspace of the calling script. I have searched the community forums and MatLAB help but have not found how to do this.
3 Comments
dpb
on 9 Jun 2022
A function will return its return variable when it terminates -- have the app terminate and return to the command line when the function completes its work.
Scripts are to be avoided, anyways...except for just playing at the command line.
Answers (1)
Benjamin Kraus
on 9 Jun 2022
This question has been asked before, and there are a few different answers threads with ideas for how to do this. Here are two:
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!