FUNCTION REFERENCE

swapbytes

Reverse the bytes of each numeric element.

Reverse the bytes of each numeric element.

Syntax

swapbytes(A)

Preserves the numeric class and shape. Supports double, single and all integer classes. One-byte integers are unchanged. Real numeric input is required.

Example

swapbytes(uint16(1))   % uint16(256)

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.