  function x = LTriSol(L,b)
%
% Pre:
%   L   n-by-n nonsingular lower triangular matrix
%   b   n-by-1 
%
% Post:
%   x   Lx = b 

   n = length(b);
   x = zeros(n,1);
   for j=1:n-1
      x(j) = b(j)/L(j,j);
      b(j+1:n) = b(j+1:n) - L(j+1:n,j)*x(j);
   end
   x(n) = b(n)/L(n,n);
