How about this?
%Inputs
sf = 2048;
rep = 6;
time = 72;
%Matrix Init
xRows = sf * time;
xCols = 3;
x = [1:xRows;1:xRows;1:xRows]';
activity1 = zeros(xRows/2,xCols);
activity2 = zeros(xRows/2,xCols);
%Samples per repetition
spr = time*sf/rep;
% Split data
for repIndex = 0:rep-1
for rowIndex = 1: spr /2 % 72/6*2048 /2 = 12288
activity1(repIndex*spr/2+rowIndex , :) = x(rowIndex+repIndex*spr,:);
activity2(repIndex*spr/2+rowIndex , :) = x(rowIndex+ spr/2 + repIndex*spr,:);
end
end
Indices should be checked for valid integers, depends on your pre processing of sample data.
