MATLAB Function Reference |
Convert decimal to hexadecimal number in string
Syntax
Description
str = dec2hex(d)
converts the decimal integer d
to its hexadecimal representation stored in a MATLAB string. d
must be a nonnegative integer smaller than 2^52.
str = dec2hex(d, n)
produces a hexadecimal representation with at least n
digits.
Examples
To convert decimal 1023 to hexadecimal,
See Also
dec2bin
, format
, hex2dec
, hex2num
dec2bin | decic |
© 1994-2005 The MathWorks, Inc.