Dear Expert,
I Want to read a binary file consist of float and char format as following:
struct PP
{
char name[9];
float x,y,z,m,n,p,q,r;
};
How can I extract only float data from the binary file with fread .

 채택된 답변

KSSV
KSSV 2019년 4월 30일

0 개 추천

fid = fopen(myfile,'r') ;
str = fread(fid,9,'*char')' ;
num = fread(fid,9,'*float') ;
fclose(fid) ;

추가 답변 (0개)

카테고리

질문:

2019년 4월 29일

답변:

2019년 4월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by