hex2num

Purpose

Hexadecimal to double number conversion.

Synopsis

f = hex2num('string')

Description

hex2num('string') converts the hex value in string string to the IEEE double precision floating-point number it represents. NaN, Inf, and denormalized numbers are all handled correctly. Fewer than 16 characters are padded on the right with zeros.

Examples

f =hex2num('400921fb54442d18')
          
f =
    3.14159265358979

Limitations

hex2num only works for IEEE numbers; it does not work for the floating-point representation of the VAX or other non-IEEE computers.

See Also

format, hex2dec

(c) Copyright 1994 by The MathWorks, Inc.