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