function r8po_sl_test ( )

%*****************************************************************************80
%
%% R8PO_SL_TEST tests R8PO_SL.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 August 2015
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8PO_SL_TEST\n' );
  fprintf ( 1, '  R8PO_SL solves a linear system with an R8PO matrix\n' );
  fprintf ( 1, '  after it has been factored by R8PO_FA.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order N = %d\n', n );
%
%  Set (the upper half of) matrix A.
%
  a = r8po_zeros ( n );

  for i = 1 : n
    a(i,i) = 2.0;
  end

  for i = 1 : n - 1
    a(i,i+1) = -1.0;
  end

  r8po_print ( n, a, '  Matrix A:' );
%
%  Factor the matrix.
%
  [ a_lu, info ] = r8po_fa ( n, a );

  if ( info ~= 0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, '  R8PO_FA declares the matrix is singular!\n' );
    fprintf ( 1, '  The value of INFO is %d\n', info );
    return
  end
%
%  Set the right hand side.
%
  b = zeros ( n, 1 );
  b(n) = n + 1;
  r8vec_print ( n, b, '  Right hand side b:' );
%
%  Solve the linear system.
%
  x = r8po_sl ( n, a_lu, b );
  r8vec_print ( n, x, '  Solution x:' );

  return
end
