Section: Elementary Functions
y = dec2hex(x)
where x
is an integer (and is promoted to a 64-bit integer if it is not).
The returned value y
is a string containing the hexadecimal representation
of that integer. If you require a minimum length for the hexadecimal
representation, you can specify an optional second argument
y = dec2hex(x,n)
where n
indicates the minimum number of digits in the representation.
--> dec2hex(1023) ans = 3ff
--> dec2hex(58128493) ans = 376f86d