Code Generation and Deployment

Generate code or standalone executables

After you develop your application using 5G Toolbox™, you can generate portable C/C++ source code, standalone executables, or standalone applications from your MATLAB® code. With code generation, you can:

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

  • Speed up processing while you work in the MATLAB environment.

  • Incorporate your algorithms into legacy code.

The following table compares deployment characteristics of MATLAB Compiler™ and MATLAB Coder™. Use this table to decide how to deploy your MATLAB code.

Deployment CharacteristicUsing MATLAB CompilerUsing MATLAB Coder
OutputNonreadable shared librariesPortable and readable C source code
Library dependencyMATLAB Runtime


Supported platforms for deploymentWindows®, Mac, and Linux®Any 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 MATLABPotentially faster, depending on the algorithm
MATLAB graphicsSupportedNot supported


What is C Code Generation from MATLAB?

Introduces code generation support.

Related Information