function gram_schmidt_naive_test ( )

%*****************************************************************************80
%
%% gram_schmidt_naive_test() tests gram_schmidt_naive().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 January 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'gram_schmidt_naive_test():\n' );
  fprintf ( 1, '  Test gram_schmidt_naive().\n' );
%
%  Use columns of the same matrix for all tests.
%
% key = 123456789;
% rng ( key );
  A = round ( 20.0 * rand ( 3, 4 ) - 10.0 );

  m = 3;
  na = 2;
  A1 = A(1:m,1:na);
  disp ( '  A1:' );
  disp ( A1 )
  U = gram_schmidt_naive ( A1 );
  [ m, nu ] = size ( U );
  disp ( '  U:' );
  disp ( U )
  UTU = U' * U;
  disp ( '  U'' * U:' );
  disp ( UTU )

  m = 3;
  na = 3;
  A2 = A(1:m,1:na);
  disp ( '  A2:' );
  disp ( A2 )
  U = gram_schmidt_naive ( A2 );
  [ m, nu ] = size ( U );
  disp ( '  U:' );
  disp ( U )
  UTU = U' * U;
  disp ( '  U'' * U:' );
  disp ( UTU )

  m = 3;
  na = 4;
  A3 = A(1:m,1:na);
  disp ( '  A3:' );
  disp ( A3 )
  U = gram_schmidt_naive ( A3 );
  [ m, nu ] = size ( U );
  disp ( '  U:' );
  disp ( U )
  UTU = U' * U;
  disp ( '  U'' * U:' );
  disp ( UTU )
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'gram_schmidt_naive_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
