fread + how can I see the contents of the file with fread?
5 次查看(过去 30 天)
显示 更早的评论
I am using fread to read and open a binary file. I should determine the size in the fread otherwise it gives me a huge vector data as a results. And I don not know how to organize it. I mean I want to see the variables of my file and the size of each, so I will know what to extract for, the file. Any help here?
Thanks,
Zeinab
0 个评论
采纳的回答
Walter Roberson
2015-10-20
Binary files often do not have any kind of header giving directory information. Some binary files are organized; it would depend upon which program was used to write the file.
There is no one format for "binary files". "binary file" is the term used for any non-text file. There is no one format for files with ".bin" extension: that extension is used by many many different programs to produce files that might not have anything to do with the other program.
Often you need to know exactly how the program wrote the files and then copy that exact format when you read. This is typical with binary files.
There is no requirement that it be possible to work it out with a little trial and error: binary files may be compressed or may have their information packed in arbitrary ways or may be encrypted.
Binary file should be understood to be any data file that is not human readable. No standards at all, overall.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!