How about using FREAD and specifying the appropriate skip
value. The following will read the signal a
in one go:
% 3 interleaved signals each of type int16
nSignals = 3;
% amount of bytes to skip after reading each sample
szINT16 = 2; % sizeof(int16)=2
skipBytes = (nSignals-1)*szINT16;
% number of samples in each signal (Inf to read all samples)
nSamples = Inf;
fid = fopen('data.dat','rb');
a = fread(fid, nSamples, '*int16', skipBytes);
fclose(fid);
You could do the same for the other two signals, you just have to seek the right start location:
fseek(fid, szINT16*1, 'bof');
b = fread(fid, nSamples, '*int16', skipBytes);
fseek(fid, szINT16*2, 'bof');
c = fread(fid, nSamples, '*int16', skipBytes);