Main Content
dec2hex
Convert decimal integer to its hexadecimal representation
Description
hexStr = dec2hex(
returns the hexadecimal,
or base-16, representation of the decimal integer D
)D
. The output argument
hexStr
is a character vector that represents hexadecimal digits using
the characters 0
-9
and
A
-F
.
If D
is a numeric vector, matrix, or multidimensional array, then
hexStr
is a two-dimensional character array. Each row of
hexStr
represents an element of D
.