FUNCTION REFERENCE

single

Convert to single precision.

Convert to single precision.

Syntax

single(X)

Each element takes 4 bytes. Arithmetic with double, logical or char values gives single, computed in single precision.

Example

x = single(pi)

Example

y = single(16777216) + 1   % stays 16777216

Differences from MATLAB: complex single is not supported yet; functions compute in double and round the result to single.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.