how to generate MATLAB code from Simulink model

347 views (last 30 days)
Keymand Kiani
Keymand Kiani on 26 Oct 2018
Edited: Eric Sargent on 9 Dec 2020
Hi, I have a relatively complex simulink model, from which a MATLAB code must be generated. I want to use the generated code in App designer to develop an app and finally compile the app using `Application Compiler`, so that it can be used on every system without having MATLAB installed. The process can be summed up as the following: Simulink --> MATLAB code (.m) --> App Designer --> Application compiler (.exe)

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 31 Oct 2018
There is no support for what you are doing.
You can use Simulink Real Time Explorer, using instrument panels for user interaction.

Eric Sargent
Eric Sargent on 9 Dec 2020
Edited: Eric Sargent on 9 Dec 2020
As of R2020a you can use Simulink Compiler to compile your model and use it with your deployed / compiled App Designer app.
More information about Simulink Compiler can be found here:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!