code: function calculateMatrixAverage(inputMatrix)
  {
  	var cells = inputMatrix.rows() * inputMatrix.cols();
  	
  	var sum = 0;
  	for(var i = 1; i <= inputMatrix.rows(); i++)
  	{
  		for(var j = 1; j <= inputMatrix.cols(); j++)
  		{
  			sum += inputMatrix.e(i, j);
  		}
  	}
  	
  	return sum/cells;
  }
docs: Computes the overall average value from a matrix of values.
  @param input A matrix of the input values
  @returns float Average value.