How do I call an App created using App Designer with an input argument?

7 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Dec 2021
Edited: MathWorks Support Team on 22 Dec 2021
Starting in R2017b, App Designer supports input arguments for apps. To add input arguments to an app, open the app in App Designer and click Code View. Then click App Input Arguments in the Editor tab.
If you use R2017a or prior releases, try the following workaround:
Create a public function in your app (use the "+ Function" in Code View and choose the "public" option) and use that to pass in any "input variables" after the app is created.
For example:
hApp = myapp;
MySetupFunction(hApp, input1, input2);

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!