 function [L] = cholC (A) 
%-----------------------------------
% function [L] = cholC(A) 
% column outer product cholesky of A
% returns a lower triangular matrix L 
%------------------------------------
 n = size(A,1) ;
 for k=1:n
     A(k,k) = sqrt(A(k,k)) ;
     A(k+1:n,k) = A(k+1:n,k)/A(k,k);
     for i=k+1:n
         A(i:n,i)=A(i:n,i)-A(i,k)*A(i:n,k);
     end
 end
 L = tril(A);
