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) Related SolutionsMATLAB: Means of the 3rd dimension of a matrix BB = mean(A, 3); MATLAB: Delete a dimension from a 3d array to convert into a 2d array (Matrix) squeeze(yourarray)orpermute(yourarray, [2 3 1])squeeze is simpler and will get rid of all singleton dimensions. Related QuestionAverage the 3rd dimension in a matrixNested For Loop for 2D MatrixHow to ignore 0 values when computing the mean over the third dimensional of a 3D matrixMatrix Standard Deviation in 3D neighborhood
Best Answer