フィルターのクリア

Binary data dealing with fread

2 ビュー (過去 30 日間)
Kei Manabe
Kei Manabe 2018 年 11 月 19 日
コメント済み: Jan 2018 年 11 月 20 日
I have a binary data file. When I look into the file in a Hex editior, I can see a 32 bit Hex value, 'F9 BD FF FF.' When I read it as fread(fid,1,'bit32','ieee-le'), the value is read as -3.448212000000000e+05. I do not understand the calculation. Could you let me know, please?

採用された回答

Jan
Jan 2018 年 11 月 20 日
I cannot confirm this.
a = uint8(sscanf('F9BDFFFF', '%2X'));
fid = fopen('test.bin', 'w');
fwrite(fid, a, 'uint8');
fclose(fid);
fid = fopen('test.bin');
b = fread(fid,1,'bit32','ieee-le') % -16903
Please post some code, which reproduces your observations.
  1 件のコメント
Jan
Jan 2018 年 11 月 20 日
Kei Manabe wrote: I have tried your code and got same result. Finally, I have found the code
"y = y*20.4;"
at around the end of the code lol...
Thank you so much for your cooperation!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by