MATLAB: Calculating mean values of a 3D matrix

matrixmean

hi.
I have a 3D matrix. size 79x63x100
I want to calc the mean of each of the 79×63 values so to get a 2D matrix the size of 79x63x1
but when i do mean(mat) i get it in the size of 1x63x100
how should I write it?
Thanks, Noa

Best Answer

out = mean(yourarray3D,3)