I am new to Apps and would like to make sure I am clear on how to it is best to get data into and out of an App.
I need to be able to run my App from an mfile and pass it input and get outputs from it. Running my App from the "App" tab is secondary, where IO can be done explicitly with user input this is not a problem.
You can run a packaged App from code via
But this does not seem to let you pass data directly in or get data directly out.
Else it looks like you can run the .mlapp directly from code with input arguemts via startupFcn(). But I dont see a good way to extract data from the App back into the mfiles workspace other than use of a global variable or the 'base' workspace.
foo = myApp(myInputData);
The above code works but seems very sloppy.
Could I use global varialbes to get data into and out of a packaged App where my mfile can then use matlab.apputil.run?
Is there a better way to do data IO? Reading/writing mat files is not an option - cant risk propriatary data being saved in odd places. Passing data through the 'base' workspace could be done but seems about a slopy as using globals.
Is there any real difference between running the packaged app and running the .mlapp?