MATLAB: How to find the mean of a multidimensional array

arraydimensionsmeanstatistics

How do i find the mean of a 21 x 6 array and get a single answer? When i try to do it I am given 6 answers.

Best Answer

Use the single ‘:’ array reference to create a column vector out of any N-dimensional array:
A = randi(99, 6); % Create Data
MeanA = mean(A(:))
MeanA =
57.25