Original data:
x= [1 2 4 6 2 7 8 4 5 7 8 9]
Reshape it into a 3-by-whatever matrix. I'll let MATLAB figure out what "whatever" is.
A = reshape(x, 3, [])
Take the mean in dimension 1 (down the columns.)
m = mean(A, 1)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!