MATLAB: Assignin variables in a stand-alone application

assigninstandalone application

I have a GUI with a button that uses the assignin() function to send variables to the 'base' for debug and analysis purposes when running the code in Matlab. What happens to these variables when the application is run as a stand-alone version? Should I disable the button when compiled as a stand-alone? Is there a test I can perform to determine if the button should be disabled or enabled?

Best Answer

The variables still get assigned to the base workspace. The base workspace would get destroyed (along with all other workspaces) when the standalone application exited, but the variables can be used until that point.
If it does not make sense in your context to be able to save those variables in stand-alone mode, use isdeployed()