FUNCTION REFERENCE

dec2hex

Decimal to hexadecimal text.

Decimal to hexadecimal text.

Syntax

s = dec2hex(d)

Syntax

s = dec2hex(d, len)

Uses digits 0-9 and A-F, with one padded row per input element.

Example

dec2hex(255)   % 'FF'

Inputs are nonnegative integers up to and including 2^53.

Differences from MATLAB: Output is limited to 65536 UTF-16 units.

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