function r8st_jac_sl_test ( )

%*****************************************************************************80
%
%% r8st_jac_sl_test() tests r8st_jac_sl().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    22 September 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8st_jac_sl_test():\n' );
  fprintf ( 1, '  r8st_jac_sl() uses Jacobi iteration to solve a linear system\n' );
  fprintf ( 1, '  with an r8st matrix.\n' );

  m = 10;
  n = 10;
  nz_num = 3 * n - 2;
  it_max = 25;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix order M =         %8d\n', m );
  fprintf ( 1, '  Matrix order N =         %8d\n', n );
  fprintf ( 1, '  Matrix nonzeros NZ_NUM = %8d\n', nz_num );
  fprintf ( 1, '  Iterations per         = %8d\n', it_max );
%
%  Set the matrix values.
%
  [ row, col, a ] = r8st_dif2 ( m, n, nz_num );
%
%  Set the desired solution.
%
  x = r8vec_indicator1 ( n );
%
%  Compute the corresponding right hand side.
%
  b = r8st_mv ( n, n, nz_num, row, col, a, x );
%
%  Set the starting solution.
%
  x = zeros ( n, 1 );
%
%  Solve the linear system.
%
  for i = 1 : 3

    x = r8st_jac_sl ( n, nz_num, row, col, a, b, x, it_max );

    r8vec_print ( n, x, '  Current solution estimate:' );

  end

  return
end
