MATLAB: Is it possible to have a function that will convert from floating point to IEEE hexadecimal

MATLAB

Add a function that will convert from floating point to IEEE hexadecimal. You currently have an IEEE hexadecimal to floating point conversion function (hex2num). It would be very helpful if you supported its compliment, ie. floating point to IEEE hexadecimal. Using the 'format hex' statement won't work since I need to have access to the bits.

Best Answer

This enhancement has been made for Release 14 (R14). For previous product releases, read below for any possible workarounds:
You can download a file, NUM2IEEE, which computes the bits in the IEEE representation of a floating-point number, from the following location: