This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Code Generation

Simulation acceleration and code generation

After you develop your simulation with MATLAB® and Communications Toolbox™, you can generate C source code or a standalone executable from your MATLAB code to

  • Speed up processing while continuing to work in the MATLAB environment

  • Run your simulation on machines that do not have MATLAB installed

  • Embed your algorithm in hardware

  • Incorporate your algorithm into legacy code

Use the table to help you decide how to post process your simulation.

Deployment CharacteristicMATLAB Compiler™MATLAB Coder™
OutputNonreadable shared librariesPortable and readable C source code
Library dependencyMATLAB RuntimeDependent on the function, objects and blocks used in your design
Supported platforms for deploymentWindows, Mac, and LinuxAny platform that supports ANSI/ISO C/C++ code
Intellectual property protectionPackaged code is encryptedCode is not encrypted; you can protect your IP by generating shared libraries instead of readable code
Algorithm accelerationSame speed as MATLABPotential to be faster; depends on algorithm
MATLAB graphicsSupportedNot supported

For an extended table, see Should I use MATLAB Compiler SDK, or MATLAB Coder to integrate my MATLAB application with C/C++?.