Function Replacement
Use the Code Replacement Tool or programming interface to define code replacement mappings for math, memory, nonfinite, semaphore, mutex, lookup table, or your own custom functions. Control data alignment. Customize the code match and replacement process.
Tools
Code Replacement Tool | Create, modify, and validate content of code replacement libraries |
Code Replacement Viewer | Explore content of code replacement libraries |
Functions
Topics
- Math Function Code Replacement
Develop a code replacement library to replace math functions.
- Memory Function Code Replacement
Define a code replacement mapping for a memory function.
- Nonfinite Function Code Replacement
Define a code replacement mapping for nonfinite utility functions.
- Algorithm-Based Code Replacement
Define a code replacement mapping based on the computation or approximation algorithm configured for a math function block.
- Lookup Table Function Code Replacement
Define a code replacement mapping for a lookup table function.
- Replace MATLAB Functions with Custom Code by Using the coder.replace Function
Replace a MATLAB function with a function in generated C or C++ code by using the
coder.replace
function. - Replace coder.ceval Calls to External Functions
Replace a function that you specify in a call to the
coder.ceval
function. - Buffer Index Calculation Code Replacement
Develop a code replacement library to replace circular buffer index calculations.
- Custom Function Code Replacement
Define a code replacement mapping for a custom C function.
- Compare Rounding and Overflow Modes in C/C++ Code and Simulink
Determine the rounding mode used in a division function for code replacement.