How to use half.typecast
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!