Reading in and storing binary data
3 views (last 30 days)
Show older comments
I have very large binary files which have data points at points of time, with recorded parameters such as freq, amplitude, etc at each of those points in time.
I know the format the binary data is written. I'm not sure of the best way to organize the data as it is read in. I'm sure there are various philosophies on this... I was thinking of reading each data point in. Time, freq, amplitude. Each data point would be in a row, and each parameter in a column in that corresponding row.
I am assuming when it is read in and stored in an array, it will end up looking like a "normal human readable array", and not just each bit stored in an array, correct? Basically, that is what I am going for, and I want to make sure I am not trying to do something that isn't possible.
0 Comments
Answers (1)
Matt J
on 16 Oct 2012
Edited: Matt J
on 16 Oct 2012
The syntax
A = fread(fid,[M,N],precision)
will read in a block of data to fill an MxN matrix, in column order. The elements of the matrix will each be a data point in your file (not an individual bit), but if they are not double floats, you must specify a non-default 'precision' argument.
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!