I found the solution myself. Here is an example for a single data file:
mean = accumarray(disc_x{1,1}(:,1), expData{1,1}(:,2),[6 1], @mean);
A similar solution was posted here: https://nl.mathworks.com/matlabcentral/answers/260309-averaging-data-in-several-columns-within-certain-intervals-of-data#answer_203241