23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

dec2hex<br />

2dec2hex<br />

Purpose Decimal to hexadecimal number conversion<br />

Syntax str = dec2hex(d)<br />

str = dec2hex(d,n)<br />

Description str = dec2hex(d) converts the decimal integer d to its hexadecimal<br />

representation stored in a <strong>MATLAB</strong> string. d must be a nonnegative integer<br />

smaller than 2 .<br />

52<br />

2-410<br />

str = dec2hex(d,n) produces a hexadecimal representation with at least n<br />

digits.<br />

Examples To convert decimal 1023 to hexadecimal,<br />

dec2hex(1023)<br />

ans =<br />

3FF<br />

See Also dec2bin, format, hex2dec, hex2num

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!