This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Supported Functions

Code generation from MATLAB® is a restricted subset of the MATLAB language that provides optimizations for:

  • Generating efficient, production-quality C/C++ code and MEX files for deployment in desktop and embedded applications. For embedded targets, the subset restricts MATLAB semantics to meet the memory and data type requirements of the target environments.

Depending on which feature you wish to use, there are additional required products. For a comprehensive list, see Installing Prerequisite Products (MATLAB Coder).

Code generation from MATLAB supports Signal Processing Toolbox™ functions listed in the table. To generate C code, you must have the MATLAB Coder™ software. If you have the Fixed-Point Designer™ software, you can use fiaccel to generate MEX code for fixed-point applications.

To follow the examples in this documentation:

  • To generate C/C++ code and MEX files with codegen, install the MATLAB Coder software, the Signal Processing Toolbox, and a C compiler. For the Windows® platform, MATLAB supplies a default C compiler. Run mex -setup at the MATLAB command prompt to set up the C compiler.

  • Change to a folder where you have write permission.


Many Signal Processing Toolbox functions require constant inputs in generated code. To specify a constant input for codegen, use coder.Constant.

An asterisk (*) indicates that the reference page has usage notes and limitations for C/C++ code generation.

Was this topic helpful?