Single-precision conversion supports the following MATLAB® language features:
Matrix operations, including deletion of rows and columns.
Variable-size data. Comparison plotting does not support variable-size data.
Subscripting (see Incompatibility with MATLAB in Matrix Indexing Operations for Code Generation).
Complex numbers (see Code Generation for Complex Data).
Numeric classes (see Supported Variable Types).
Arithmetic, relational, and logical operators.
Single-precision conversion does not support the complete set of Unicode® characters. Characters are restricted to 8 bits of precision in generated code. Many mathematical operations require more than 8 bits of precision. If you intend to convert your MATLAB algorithm to single precision, it is a best practice not to perform arithmetic with characters.
MATLAB classes. Single-precision conversion supports:
It does not support class inheritance or packages.
Single-precision conversion using
codegen with the
-singleC option does not support classes when the
properties have default values. Property values must be initialized in the
constructor. Constant properties cannot be initialized to double precision
Function calls (see Resolution of Function Calls for Code Generation)
Single-precision conversion does not support the following features:
Objects of value classes as entry-point function inputs or outputs
generation of fewer input or output arguments than an entry-point function