Custom processing for ABR weighted averaging

So further to the point above I realised that I needed a vector dimension to specify that the calculation must be across the matrix then over the pages. That is to say...

RN = zeros(Nchannels, Nepochs); % Nchannels = 6 recording channels and Nepochs = 6000 epochs
for i = 1 : Nepochs
RN(i) = std(data(:, :, 1:i), 0, [2 3]); % data = 6 X 493 X 6000 3D matrix.
end

Here the std(A, 0, [2 3]) was used and [2 3] was specified as the calculation dimension is across the matrix first then over the pages.

However, I keep getting the error "Unable to perform assignment because the left and right sides have a different number of elements."

What am I doing wrong?

I thought by making "RN = zeros(Nchannels, Nepochs);" which is a 6 X 6000 matrix, the "for" loop would then automatically insert the output data (6 X 1 matrix) 6000 times eventually completing the 6 X 6000 matrix??