필터 지우기
필터 지우기

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

조회 수: 2 (최근 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 CenterFile Exchange에서 Low-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