function x = r8lt_sl ( n, a, b )

%*****************************************************************************80
%
%% r8lt_sl() solves A*x=b, where A is an R8LT matrix.
%
%  Discussion:
%
%    The R8LT storage format is used for an M by N lower triangular matrix,
%    and sets aside storage even for the entries that must be zero.
%
%    No factorization of the lower triangular matrix is required.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 August 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of the matrix.
%
%    real A(N,N), the R8LT matrix.
%
%    real B(N), the right hand side.
%
%  Output:
%
%    real X(N), the solution vector.
%
  x(1:n) = b(1:n);

  for j = 1 : n
    x(j) = x(j) / a(j,j);
    x(j+1:n) = x(j+1:n) - a(j+1:n,j)' * x(j);
  end

  return
end
