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.

Introduction to Code Generation

Generating C/C++ code requires MATLAB® Coder™. MATLAB Coder generates readable and portable C and C++ code from Statistics and Machine Learning Toolbox™ functions that support code generation. You can integrate the generated code into your projects as source code, static libraries, or dynamic libraries. You can also use the generated code within the MATLAB environment to accelerate computationally intensive portions of your MATLAB code.

For a list of the code-generation-enabled functions in Statistics and Machine Learning Toolbox, see Code Generation Support, Usage Notes, and Limitations. For the code generation usage notes and limitations for each function, see the Code Generation section on the function reference page. Note that the MATLAB Coder limitations apply to Statistics and Machine Learning Toolbox for code generation. For details, see MATLAB Language Features Supported for C/C++ Code Generation (MATLAB Coder). In addition to these limitations, code generation in Statistics and Machine Learning Toolbox does not support sparse matrices.

Code Generation Workflows

You can generate C/C++ code for the Statistics and Machine Learning Toolbox functions in several ways.

Code Generation Applications

Code generation for the Statistics and Machine Learning Toolbox functions also works with other toolboxes such as Simulink®, System object™, and Stateflow®, as described in these examples:

For more applications of code generation, see these examples:

See Also

| | |

Related Topics