matlabsimulinkmcc

Compiling .m files that call simulink models


Will a .m file that calls a simulink model using sim() sill compile and function properly using mcc?

Alternatively would compiling the simulink files to a dll, calling that dll from the .m file and then using mcc produce the desired results?


Solution

  • The sim function is not supported by MATLAB Compiler.

    There are a couple of workarounds, although they are messy and require quite a bit of modification to your workflow. See simulink matlab standalone executable unable to get output for more info.