This function uses Java to convert arbitrary length decimal numbers to hexadecimal, for nonnegative integers. (Therefore, it is the inverse of the previously posted JHEX2DEC function.) Remember that inputs and outputs are character arrays. It does not require the Symbolic Toolbox.
h = jdec2hex(d);
d = decimal intput character array
h = hexdecimal output character array
Michael Kleder (2022). JDEC2HEX (https://www.mathworks.com/matlabcentral/fileexchange/8986-jdec2hex), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!