Fixed-Point Code Generation in MATLAB
To generate code, you must have theMATLAB Coderproduct. For information on code generation, see theMATLAB Coderdocumentation.
Topics
- Ways to Generate Code
Discusses using Fixed-Point Designer™ software with code generation.
- Workflow for Fixed-Point Code Acceleration and Generation
Describes the steps required for preparing MATLAB code and converting it to a MEX function.
- Functions Supported for Code Acceleration or C Code Generation
Lists the Fixed-Point Designer features supported by code generation from MATLAB.
- Code Generation with MATLAB Coder
Introduces you to theMATLAB Coderproduct.
- Code Generation for Constants in Structures and Arrays
Sometimes the code generator does not recognize constant structure fields or array elements.
- Code Generation with MATLAB Function Block
Introduces you to theMATLAB Functionblock.
- Generate Fixed-Point FIR Code Using MATLAB Function Block
Create and generate code for a fixed-point, low-pass, direct form FIR filter.
- Avoid Multiword Operations in Generated Code
This example shows how to avoid multiword operations in generated code by using the
accumpos
function instead of simple addition in your MATLAB algorithm. - Find Potential Data Type Issues in Generated Code
Highlight potential data type issues in report.
Troubleshooting
If your C compiler reports a run-time stack overflow, set the value of the maximum stack usage parameter to be less than the available stack size.
Tips for Making Generated Code More Efficient
Describes techniques which can be used to make generated code more efficient.
Data types supported for simulation and code generation.