How to proceed on opening a bin/binx file?
7 Ansichten (letzte 30 Tage)
I am trying to read a bin/binx file (see the format attached). I am here to ask how do I proceed? What parameters/information is needed to begin with? Your help is much appreciated. Thank you.
Krishna am 7 Okt. 2022
If you have a binary file, you can read from it using the following commands,
fid = fopen('data.bin','rb') % opens the file for reading
A = fread(fid, count, 'int16') % reads _count_ elements and stores them in A.
The commands fopen and fread default to Little-endian encoding for the integers. If your file is Big-endian encoded you will need to change the fread to
A = fread(fid, count, 'int16', 'ieee-be');
And if you want to read the file's data into matrix with n columns use
Walter Roberson am 7 Okt. 2022
.binx files are an extension to XML to provide keywords to describe binary files. The .binx file is XML does not contain the binary data itself: it refers to it by URI; the .binx having provided structured information to describe the file format.
Unfortunately at the moment I do not see any functions to read from such files -- not in MATLAB, not in Python.