hex2num
Convert hexadecimal string to number using quantizer
object
Description
converts hexadecimal character vector x
= hex2num(q
,h
)h
to numeric matrix
x
.
The attributes of the numbers in x
are specified by quantizer
object q
. When h
is a cell
array, hex2num
returns x
as a cell array of the same
dimension containing numbers. For fixed-point hexadecimal representations,
hex2num
uses Two's Complement representation. For floating point, the representation
is IEEE® Standard 754 style.
When there are fewer hexadecimal digits than needed to represent the number, the fixed-point conversion zero-fills on the left. Floating-point conversion zero-fills on the right.
hex2num
and num2hex
are inverses of one another, with the distinction that
num2hex
returns the hexadecimal representations in a column.
Note
This function uses a quantizer
object to convert a hexadecimal
string to a number. To convert IEEE hexadecimal format to a double-precision number
without using a quantizer
object, use the MATLAB®
hex2num
function.
Examples
Input Arguments
Version History
Introduced before R2006a