MATLAB: Hi, I’m new to matlab and wanted to find the mean of all the values in the matrix/data set and was wondering how I would do this

mean

This
mean(a(:))
has been suggested but it has not worked for me.

Best Answer

  • See the documentation for the mean command here
    So if you want the mean of an entire matrix write the following
    mean(a,'all')