function provec_test ( )

%*****************************************************************************80
%
%% provec_test() tests provec().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 May 2005
%
%  Author:
%
%    John Burkardt
%
  m = 4;
  n = 2;

  base = [ ...
    4.0, 3.0, 2.0, 1.0; ...
    1.0, 2.0, 3.0, 4.0 ]';
  vecm = [ 1.0, 1.0, 1.0, 2.0 ];
 
  fprintf ( 1, '\n' );
  fprintf ( 1, 'provec_test():\n' );
  fprintf ( 1, '  provec() projects a vector onto a subspace.\n' );
 
  r8mat_transpose_print ( m, n, base, '  Base vectors' );
  
  r8vec_print ( m, vecm, '  Vector to be projected:' );
 
  [ vecn, vecnm ] = provec ( m, n, base, vecm );
 
  r8vec_print ( n, vecn, '  Projected vector in BASE coordinates:' );

  r8vec_print ( m, vecnm, '  Projected vector in original coordinates:' );
 
  return
end
