  function X = LTriSolM(L,B)
%
% Pre:
%   L   n-by-n nonsingular lower triangular matrix
%   B   n-by-r 
%
% Post:
%   X   LX = B 


   [n,r] = size(B);
   X = zeros(n,r);
   for j=1:n-1
      X(j,1:r)     = B(j,1:r)/L(j,j);
      B(j+1:n,1:r) = B(j+1:n,1:r) - L(j+1:n,j)*X(j,1:r);   
   end
   X(n,1:r) = B(n,1:r)/L(n,n);
  
