Single-Precision Conversion

Convert double-precision code to single-precision code (requires Fixed-Point Designer™)

Classes

coder.SingleConfigDouble-precision to single-precision conversion configuration object

Functions

coderOpen MATLAB Coder app
codegenGenerate C/C++ code from MATLAB code
coder.configCreate MATLAB Coder code generation configuration objects

Examples and How To

Choose a Single-Precision Conversion Workflow

Generate single-precision C/C++ code or generate single-precision MATLAB® code.

Generate Single-Precision C Code at the Command Line

Use codegen to generate single-precision C code from double-precision MATLAB code.

Generate Single-Precision C Code Using the MATLAB Coder App

Use the app to generate single-precision C code from double-precision MATLAB code.

Generate Single-Precision MATLAB Code

Generate single-precision MATLAB code from double-precision MATLAB code.

Concepts

MATLAB Language Features Supported for Single-Precision Conversion

Use supported MATLAB language features for single-precision conversion.

Single-Precision Conversion Best Practices

Generate single-precision MATLAB code or single-precision C/C++ code according to best practices.

Warnings from Conversion to Single-Precision C/C++ Code

Address warnings from single-precision conversion.

Combining Integers and Double-Precision Numbers

Do not combine integers and double-precision numbers in MATLAB code for conversion to single-precision C/C++ code.