Reading in and storing binary data
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Matt J
2012-10-16
编辑:Matt J
2012-10-16
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!