hexsingle2num

バージョン 1.0.0.0 (2.32 KB) 作成者: Mark Lubinski
hex2num for single.
ダウンロード: 4.3K
更新 2005/6/22

ライセンスの表示

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.

引用

Mark Lubinski (2026). hexsingle2num (https://jp.mathworks.com/matlabcentral/fileexchange/6927-hexsingle2num), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R14SP1
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersNumeric Types についてさらに検索
謝辞

ヒントを与えたファイル: hex2fp, singlehex2num, Simulink hexsingle2num block

バージョン 公開済み リリース ノート
1.0.0.0

Fixed bug with underflow (bug found by Matthias Noell).