MATLAB: How to find the raw mean value in matrix

MATLABmatricesmatrixmatrix array

if I have this matrix
x=[1 2 3 4;5 6 7 8; 9 10 12 13];
How can I find the mean value in each raw since the mean value finds the mean value of each column?
and how could I find the maximum value of the entire matrix? (which is one number)

Best Answer

The documentation is your friend. Look at some of the optional inputs for mean and max. In particular, look for options like 'dim' and 'all'.