single - Single-precision arrays - MATLAB (original) (raw)
Thesingle
function fully supports tall arrays. For more information, see Tall Arrays.
Usage notes and limitations:
- When using single-precision integers with the colon operator, if either of the end points have a value that is greater in absolute value than
flintmax('single')
in your MATLAB code, then the generated code might produce different values as compared to the MATLAB code. For example:
function z = mismatch_values
a = single(1);
b = flintmax('single') + 2;
d = single(9);
z = a:d:b;
end
Thez
values that are calculated by the generated code and MATLAB code are different due to the different rounding methods used by the generated code and MATLAB code.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
The single
function fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray (Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).