Because single precision numbers use only 32 bits, they require
less memory than double-precision numbers while still offering many
of the benefits of floating point arithmetic. You can convert your
double-precision MATLAB code to single-precision using the convertToSingle
function at the command
line.
coder.SingleConfig | Double-precision to single-precision conversion configuration object |
Generate Single-Precision MATLAB Code
Generate single-precision MATLAB® code from double-precision MATLAB code.
MATLAB Language Features Supported for Single-Precision Conversion
For single-precision conversion, use supported MATLAB language features.
Single-Precision Conversion Best Practices
Generate single-precision MATLAB code or single-precision C/C++ code according to best practices.