when i write doesn't displays anything
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
lafnath p
am 28 Okt. 2016
Kommentiert: lafnath p
am 28 Okt. 2016
fid = fopen('new.bin','w');
A= [1 2 3 4];
fwrite(fid,A);
fclose(fid);
this code doesn't gives any data in the bin file when i open that file in matlab i didn't see anything.
0 Kommentare
Akzeptierte Antwort
KSSV
am 28 Okt. 2016
% Wrtie a binary file
fid = fopen('new.bin','w');
A= [1 2 3 4];
fwrite(fid,A);
fclose(fid);
% Read the file created
fid = fopen('new.bin','r') ;
A = fread(fileID) ;
fclose(fid)
A
It is working fine. You are writing data to a binary file, use fread to read the file created.
Note: You asked many questions and accepted no answer so far. You must acknowledge the people who spent time to answer your queries. You have to accept the answer.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!