function r8plu_to_r8mat_test ( )

%*****************************************************************************80
%
%% r8plu_to_r8mat_test() tests r8plu_to_r8mat();
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 April 2009
%
%  Author:
%
%    John Burkardt
%
  n = 5;
  b = 0.0;
  c = 1.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8PLU_TO_R8MAT_TEST\n' );
  fprintf ( 1, '  R8PLU_TO_R8MAT determines the original matrix from\n' );
  fprintf ( 1, '  the compressed PLU factors.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );
%
%  Set the matrix.
%
  a = rand ( n, n );

  r8mat_print ( n, n, a, '  The matrix A:' );
%
%  Factor the matrix.
%
  [ pivot, lu, info ] = r8mat_to_r8plu ( n, a );

  if ( info ~= 0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'Warning!\n' );
    fprintf ( 1, '  R8MAT_TO_R8PLU declares the matrix is singular!\n' );
    fprintf ( 1, '  The value of INFO is %d\n', info );
  end
%
%  Display the gory details.
%
  i4vec_print ( n, pivot, '  The pivot vector P:' );

  r8mat_print ( n, n, lu, '  The compressed LU factors:' );
%
%  Recover the matrix from the PLU factors.
%
  a2 = r8plu_to_r8mat ( n, pivot, lu );

  r8mat_print ( n, n, a2, '  The recovered matrix A2:' );

  return
end
