Typecast a double precision number or vector to a 16 character hexadecimal string of the IEEE 754 representation of the number. For example
num2hex ([-1, 1, e, Inf, NaN, NA]); "bff0000000000000 3ff0000000000000 4005bf0a8b145769 7ff0000000000000 fff8000000000000 7ff00000000007a2"