

This helps us to calculate the mean over all the dimensions of the array.

There is also a new feature introduced in MATLAB, starting in R2018b. if we have a matrix, then the mean(X,) will be the mean of all the elements present in A, because every element of the matrix A will be contained in the slice of the array defined by the dimensions 1 & 2 (As already mentioned, please do Remember that dimension 1 is for Rows and 2 is for columns) This function will calculate the mean on the basis of the dimensions specified in the vecdim vector. The dimension passed will be a scalar quantity. This function will result in the mean along the dimension dim. Here, since the dimension is not mentioned, the mean is taken along the row elements This dimension will become 1 and the size of other dimensions will not be changed.

Hadoop, Data Science, Statistics & others Syntax of Mean Function in Matlab
