필터 지우기
필터 지우기

I have a data of binary format. i.e the data is stored in .dat file format. How to open these files in MatLab and then ve to find the pentad average of these data.

조회 수: 4 (최근 30일)
I have a data of binary format. i.e the data is stored in .dat file format. How to open these files in MatLab and then ve to find the pentad average of these data and prepare another file for these pentad average data. Is it possible to do statistical calculations of .dat files in MatLab?

채택된 답변

Iain
Iain 2014년 8월 20일
What you need to do is open the dat file, read out the data, then process that data.
fid = fopen(filename,'r'); % open the file for read access
data(1) = fread(fid,1,'*uint8'); % read a single 8 bit integer from the file.
dat = fread(fid,1000,'*uint16'); % read a 1000 16 bit integer from the file.
fclose(fid); % close the file.
I don't know the format of the file. You need to apply that knowledge to make sure you read it right.
  댓글 수: 3
Iain
Iain 2014년 8월 20일
If its full of say, unsigned 8 bit integers, you can certainly calculate things like mean, median, mode, std, min, max....

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by