FUNCTION REFERENCE

typecast

Reinterpret the bytes of a numeric vector as another class.

Reinterpret the bytes of a numeric vector as another class.

Syntax

typecast(X, CLASSNAME)

X is a real integer, single or double vector; the byte count must be a multiple of the new element size. A row stays a row, a column stays a column.

Example

x = typecast(single(1), 'uint32')

Differences from MATLAB: none known.

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