|
|
| File Information |
| Description |
hexsingle2num converts a single precision IEEE hexadecimal string to a number.
hexsingle2num is a version of hex2num which works with single precision floats. Currently MATLAB hex2num converts to double precision floats.
HEXSINGLE2NUM(S), where S is a 8 character string containing a hexadecimal number, returns a double type number equal to the IEEE single precision floating point number it represents. Fewer than 8 characters are padded on the right with zeros.
If S is a character array, each row is interpreted as a single precision number (and returned as a double).
NaNs, infinities and denorms are handled correctly.
Example:
hexsingle2num('40490fdb') returns Pi.
hexsingle2num('bf8') returns -1. |
| Acknowledgements |
This submission has inspired the following:
singlehex2num, Simulink hexsingle2num block
|
| MATLAB release |
MATLAB 7.0.1 (R14SP1)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (9) |
| 12 May 2005 |
Reinhold Habeck
|
|
|
| 29 Jan 2006 |
John Winger
|
|
|
| 28 Sep 2007 |
Seung Ho Ok
|
|
|
| 18 Jul 2008 |
Daniel Martin
|
|
|
| 30 Jul 2008 |
Steven Wright
|
|
|
| 07 Mar 2009 |
Jaykumar Shah
|
|
|
| 17 May 2011 |
Tanya
|
|
|
| 26 Aug 2011 |
Andrey Krishkevich
|
|
|
| 07 Feb 2012 |
neea
|
|
|
| Updates |
| 22 Jun 2005 |
Fixed bug with underflow (bug found by Matthias Noell). |
|
Contact us at files@mathworks.com