You are on page 1of 5

A = readmatrix('matrix_A.

txt');

[n,n] = size (A)

b= zeros(15);

for i=1:n
b(i,i)=1
end

[n,n] = size (A)

L = L_decomposition (A,b);
U = U_decomposition (A,b);

for i= 1:n
x(:,i) = decomp_LU (L,U,b(:,i));

matrix_x = x
%x is the inverse matrix of A

end

L_decomposition (A,b);
U_decomposition (A,b);

total_count = count + count_3 + count_4

You might also like