function r8mat_covariance_test ( )

%*****************************************************************************80
%
%% R8MAT_COVARIANCE_TEST tests R8MAT_COVARIANCE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 August 2018
%
%  Author:
%
%    John Burkardt
%
  m = 4;
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8MAT_COVARIANCE_TEST\n' );
  fprintf ( 1, '  R8MAT_COVARIANCE computes the covariance.\n' );
 
  seed = 123456789;

  [ a, seed ] = r8mat_uniform_ab ( m, n, 0.0, 10.0, seed );
 
  r8mat_print ( m, n, a, '  Array of M vectors of length N:' );
 
  c = r8mat_covariance ( m, n, a );

  r8mat_print ( m, m, c, '  MxM covariance matrix:' );

  return
end
