How to use half.typecast
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!