How to use half.typecast
古いコメントを表示
I have to read in a 16-bit float from a binary file. I used
x = fread(fid,1,'*uint16','ieee-be') since there is no half data type for fread.
I then tried half.typecast(x) to get the number. The number being put in is uint16 65444. It should return -0.640625. I'm getting NaN back. What could I be doing wrong?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!