MATLAB: Array average every 30 values

array

Hi again,
I have an Array of 1440×31 and I would like to get another Array, that's calculates the average of every 30 elements (of each row), so finally the array will be 48×31. I had a similar question but struggling to find it again,
thanks!

Best Answer

squeeze(mean(reshape(A,30,48,31)))
Assuming A is the matrix
HTH