Question: Here is the code for LU factorization: function A=LU_decomposition (A) [ rows_A , cols_A ] = s i z e (A) i f rows_A =

 Here is the code for LU factorization: function A=LU_decomposition (A) [

rows_A , cols_A ] = s i z e (A) i f

Here is the code for LU factorization:

function A=LU_decomposition (A)

[ rows_A , cols_A ] = s i z e (A)

i f rows_A = cols_A

error ( A matrix must be square . )

end

n = rows_A ;

f o r col = 1: n1

f o r row = col +1:n

f a c t o r = A(row , col ) / A( col , col ) ;

A(row , col ) = f a c t o r;

f o r k = col +1: cols_A

A(row , k) = A(row , k)f a c t o rA( col , k) ;

end

end

end

end

a. Write a function that finds the inverse of a square matrix column-by-column using LU factorization code that you developed in problem 3. The input is a square matrix. b. Use the code you developed in part a to compute the inverse of the following matrix Print the result 3 0 -1 10 -7 0 6 4 0 3 2 1 A=

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!