precision of a binary file or text file? "fread"

1 回表示 (過去 30 日間)
Farz Tak
Farz Tak 2016 年 11 月 2 日
回答済み: upol 2018 年 2 月 17 日
Hi
I am using fopen/fread to read and store my files. I could read them with "importdata" but that was super slow. For using fread, I do not know the precision of the data. How can I know the precision? Attached is one of the files.
Thanks a lot, I have been working on it for two days and could not figure it out yet.
Zeinab

採用された回答

Jan
Jan 2016 年 11 月 2 日
This is an ASCII-file. Then the precision is not meaningful, because it matters binary files only. Do not use fread, but fscanf.
  1 件のコメント
Farz Tak
Farz Tak 2016 年 11 月 2 日
Thanks. I thought that there is a way to read it with fread which is much much faster than fscant. But thank you now I am sure there is no way to use fread.

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

その他の回答 (1 件)

upol
upol 2018 年 2 月 17 日
fscanf doesnt support into matlab c coder. what other option do i have?

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by