MATLAB Function Reference
  Go to function:
    Search    Help Desk 
dec2hex    Examples   See Also

Decimal to hexadecimal number conversion

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 .

str = dec2hex(d,n) produces a hexadecimal representation with at least n digits.

Examples

dec2hex(1023) is the string '3ff'.

See Also

dec2bin     Decimal to binary number conversion

format      Control the output display format

hex2dec     IEEE hexadecimal to decimal number conversion

hex2num     Hexadecimal to double number conversion




[ Previous | Help Desk | Next ]