function m = meanVal(C)
% Return the mean of the values in the 2D array C.

[p,q] = size(C);

m = sum(sum(C))/(p*q);