open up a raw binary file .rbf from quartus II
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Greetings,
I have a raw binary file generated from quartus II 11.1 that I need to open in Matlab and display in Hex. How can I do this I tried using fopen()
fid = fopen('VCS_5405.rbf','r','l')
And.. I get 3 returned. What's going on with that??
Thanks
0 Kommentare
Antworten (1)
Walter Roberson
am 28 Mär. 2012
A return value of 3 from that statement would be typical. The value returned from fopen() is a File Identifier, which is a number used to identify which file you are referring to when you use other I/O statements.
After your fopen() statement, you will need fread() statements to read the data from the file, and you will need output statements such as fprintf() to display the file content as hex.
For example,
fid = fopen('VCS_5405.rbf','r','l');
while true
this16 = fread(fid, 16, '*uint8');
if isempty(this16); break; end %end of file
thisfmt = [repmat('%02X ', 1, length(this16)-1), '%02X\n'];
fprintf(1, thisfmt, this16);
end
0 Kommentare
Siehe auch
Kategorien
Mehr zu Standard File Formats 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!