function center_of_mass

  n = 20;
  x = round ( 10 * rand(2,n) );

  com = sum ( x(1:2,:), 2 ) / n;

  clf
  plot ( x(1,:), x(2,:), 'b*' )
  hold on
  plot ( com(1,:), com(2,:), 'r.' );
  axis ( [ -2, 12, -2, 12 ] );
  axis square


  return
end
function var = variance ( n, x, com )

  var = 0.0;
  for j = 1 : n
    var = var + norm ( x(:,j) - com(:) )^2;
  end
  var = sqrt ( var / n );
  return
end
