function [L,U]=mylu1(A)
N=length(A);
for k=1:N-1
    i=[k+1:N];
    A(i,k)=A(i,k)/A(k,k);
    A(i,i)=A(i,i)-A(i,k)*A(k,i);
end
U=triu(A);
L=eye(N)+tril(A,-1);