Code Generation and Deployment

Generate standalone applications for desktop computers, mobile devices, and embedded targets

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

  • Run your algorithm on machines that do not have MATLAB or Simulink installed.

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

  • Embed your algorithm in hardware.

  • 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 or Simulink model.

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

Library dependency only for audio I/O features: Run Audio I/O Features Outside MATLAB and Simulink

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

To deploy an audio plugin to a digital audio workstation, see Export a MATLAB Plugin to a DAW.

To deploy a System object™ audio plugin to Simulink, see Convert Audio Plugin System Objects to Simulink Blocks.


What is C Code Generation from MATLAB?

Introduces code generation support.

Run Audio I/O Features Outside MATLAB and Simulink

Set your system environment to use dynamic library files for deployed audio I/O System objects and blocks.

Featured Examples