Pass variables/structure to .mlapp (GUI/App designer)
Show older comments
Hello,
I want to run my matlab script (.m file) amd want to pass data to GUI/.mlapp from my .m file(matlab script) workspace. The data can be a variable/structure.
Also, I want GUI to also pass some data back to .m file.
Thanks !!!
Accepted Answer
More Answers (3)
Image Analyst
on 9 Jan 2023
0 votes
Walter Roberson
on 9 Jan 2023
0 votes
App designer creates code that defines an object class the derives from handle.
At least in theory, you could modify the constructor to accept additional parameters. Or probably better would be adding methods that accepted the handle object and the additional data, and performed an action and returned appropriate values.
chrisw23
on 9 Feb 2023
0 votes
Calling your mlapp application from your script returns the app handle with full access to all public objects
myAppHandle = myApp()
Observed properties are an option to establish an event structure for bidirectional communication.
Categories
Find more on App Building 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!