Matlab如何将数字转换为二进制的单精度浮点表示

时间:2012-01-11 20:47:59

标签: matlab

  

可能重复:
  Binary representation of a number in Matlab

我正在使用matlab,并希望将7546.456124865之类的数字转换为单精度。

我使用了single()命令,但我想获得单精度浮点的二进制文件。我该怎么做呢?

1 个答案:

答案 0 :(得分:5)

>> num2hex(single(7546.456124865))

ans =

45ebd3a6