Skip to content

dec2hex

strings · scripts/strings/dec2hex.m

: h = dec2hex (d)
: h = dec2hex (d, len)

Return the upper case hexadecimal text of the integers in d.

The result has one row per element of d (column-major order), zero padded on the left to a common width of at least len digits. Negative values use two’s complement with 2, 4, 8 or 16 digits.