MATLAB Function Reference
  Go to function:
    Search    Help Desk 
single    See Also

Convert to single precision

Syntax

Description

Y = single(X) converts the vector X to single precision. X can be any numeric object (such as a double). If X is already single precision, single has no effect. Single precison quantities require less storage than double precision quantities but have less precision and a smaller range.

The single class is primarily meant for storing single-precision values. Most operations that manipulate arrays without changing their elements are defined (e.g., reshape, size, the relational operators, subscripted assignment and subscripted reference). No math operations are defined for the single.

You can define your own methods for the single (as you can for any object) by placing the appropriately named method in an @single directory within a directory on your path.

See Also

double,int8,int16,int32, uint8,uint16,uint32



[ Previous | Help Desk | Next ]