Documentation

Fixed-Point Code Generation

Fixed-point C-code generation using MATLAB® Coder™ product

To generate code, you must have the MATLAB Coder product. For information on code generation, see the MATLAB Coder documentation.

Examples and How To

Generate Fixed-Point FIR Code Using MATLAB Function Block

Create and generate code for a fixed-point, lowpass, 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.

Concepts

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

Ways to Generate Code

Discusses using Fixed-Point Designer software with code generation

Code Generation with MATLAB Coder

Introduces you to the MATLAB Coder product

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 the MATLAB Function block

Troubleshooting

Fix Run-Time Stack Overflows

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

Was this topic helpful?