function a_lt = r8ge_to_r8lt ( m, n, a_ge )

%*****************************************************************************80
%
%% r8ge_to_r8lt() copies an R8GE matrix to an R8LT matrix.
%
%  Discussion:
%
%    The R8GE storage format is used for a general M by N matrix.  A storage 
%    space is made for each entry.  The two dimensional logical
%    array can be thought of as a vector of M*N entries, starting with
%    the M entries in the column 1, then the M entries in column 2
%    and so on.  Considered as a vector, the entry A(I,J) is then stored
%    in vector location I+(J-1)*M.
%
%    The R8LT storage format is used for an M by N lower triangular 
%    matrix.  The format stores all M*N entries, even those which are zero.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 August 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, N, the order of the matrix.
%
%    real A_GE(M,N), the R8GE matrix.
%
%  Output:
%
%    real A_LT(M,N), the R8LT matrix.
%
  a_lt = zeros ( m, n );

  for j = 1 : n
    for i = j : m
      a_lt(i,j) = a_ge(i,j);
    end
  end

  return
end
