MATLAB: How to call an GUI created using App Designer with input argument

appdesignerargumentsinputMATLABmlappoutput

How to make apps created using App Designer accept input arguments or return outputs?

Best Answer

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.
For the detail, please refer following documentation.
If you use R2017a or previous version, please refer following workaround:
A workaround is to 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);