how to read interleaved data with memmapfile()?
I have a large (4GB+) data file I'd like to access. It contains samples i
of a number of different signals {a, b, c} as follows:
a_1 b_1 c_1 a_2 b_2 c_2 .... a_n b_n c_n
I would like to use memmapfile to retrieve, say, the a stream. Since I
know the number of signals and the number of samples, I tried:
m = memmapfile('data.dat','Format',{'int16',[nSignals
1],'sid'},'repeat',nSamples);
but this returns the useless m field
Data: nSamples x 1 struct array with fields:
sid
Of course the following works fine, but is very slow:
m = memmapfile('data.dat','Format','int16');
a = m.Data(1:nSignals:end);
How can I recover a without having to access the full data matrix?
No comments:
Post a Comment