Convert to single precision
B = single(A)
B = single(A) converts
A to single precision, returning that
A can be any numeric
object (such as a
already single precision,
single has no effect.
Single-precision quantities require less storage than double-precision
quantities, but have less precision and a smaller range.
single class is primarily meant to
be used to store single-precision values. Hence most operations that
manipulate arrays without changing their elements are defined. Examples
size, the relational operators, subscripted
assignment, and subscripted reference.
You can define your own methods for the
by placing the appropriately named method in an
within a folder on your path.
a = magic(4); b = single(a); whos Name Size Bytes Class a 4x4 128 double array b 4x4 64 single array