function LU_Doolittle_decomposition(A)
n = size(A);
L = zeros(n);
U = zeros(n);
U(1,:) = A(1,:);
L(:,1) = A(:,1)/U(1,1);
L(1,1) = 1;
for k = 2:n
    for i = 2:n
        for j = i:n
            U(i,j) = A(i,j) - dot(L(i,1:i-1),U(1:i-1,j));
        end
        L(i,k) = (A(i,k) - dot(L(i,1:k-1),U(1:k-1,k))) / U(k,k);
    end
end
disp('The lower-triangular matrix is:');
L
disp('The upper-triangular matrix is:');
U
