Main Content

Code Replacement

Customize code generated from a model by using a code replacement library

Use libraries to optimize generated C or C++ code for a specific application or run-time environment, or to customize the code to integrate with existing implementations of supported operations. To get started, see What Is Code Replacement?.

Tools

Code Replacement ViewerExplore content of code replacement libraries

Topics

  • What Is Code Replacement?

    Why and how to replace code. Code replacement libraries that MathWorks provides. Contents of a code replacement library and how the code generator uses the contents. Terminology and limitations.

  • Choose a Code Replacement Library

    Explore available code replacement libraries and library content to find a suitable match for your code requirements.

  • Replace Code Generated from Simulink Models

    This example shows how to replace generated code, using a code replacement library.

  • Analyze Code Replacements in Generated Code

    The Code Replacements Report section in the code generation report documents the code replacement library (CRL) functions that were used for code replacements during code generation.