MATLAB: Matlab Compiler And Simulink

guiMATLAB Compilersimulink

Hi, I am trying to use matlab compiler to create a standalone application out of my GUI. Unfortunately in the GUI I must use 'sim' and 'simset' to call some simulink model. Does anyone have an idea how to work this out?
Thanks a lot! Jerry

Best Answer

The SIM and SIMSET command can not be called from the MATLAB Compiler (This is documented here). To build a standalone GUI that runs your simulation, you need to make the simulation standalone, then build the GUI to run that.
This can be accomplished by using Simulink Coder (or Real-Time Workshop in earlier released) to build a standalone executable. This executable can be called by the GUI to run. The outputs of the simulation executable can be loaded by the GUI and analyzed.
A similar question was asked to Technical Support, and they published a solution: How can I create a standalone executable of a MATLAB GUI which calls a Simulink model?