Main Content
single
Single-precision arrays
Description
Single-precision variables in MATLAB® are stored as 4-byte (32-bit) floating-point values of data type (class)
single
. For example:
y = single(10);
whos y
Name Size Bytes Class Attributes y 1x1 4 single
For more information on floating-point values, see Floating-Point Numbers.
Creation
If you have an array of a different type, such as double
or
int8
, then you can convert that array to a single precision array by
using the single
function.
Syntax
Input Arguments
Examples
Extended Capabilities
Version History
Introduced before R2006a