function b = r8lt_mv ( m, n, a, x )

%*****************************************************************************80
%
%% r8lt_mv() multiplies a R8LT matrix times a vector.
%
%  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.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 August 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of rows of the matrix.
%    M must be positive.
%
%    integer N, the number of columns of the matrix.
%    N must be positive.
%
%    real A(M,N), the R8LT matrix.
%
%    real X(N), the vector to be multiplied by A.
%
%  Output:
%
%    real B(M), the product A * x.
%
  x = x(:);

  b = zeros ( m, 1 );

  for i = 1 : m
    jmax = min ( i, n );
    b(i) = a(i,1:jmax) * x(1:jmax);
  end

  return
end
