Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer with matlab code. Thanks! Consider the matrix In this problem we will investigate the LU decomposition of A with and without pivoting (i.e.,
Please answer with matlab code. Thanks!
Consider the matrix In this problem we will investigate the LU decomposition of A with and without pivoting (i.e., with and without reordering the rows). First, find the condition number of A using cond and save your answer in a variable named ans1. You should find that the condition number is not particularly large, which suggests that any reasonable linear system solver should work well with this matrix. It is easy to check by hand that the LU decomposition of A (without reordering the rows) is . 10-20 L = 1920 and U = 01 - 1020 Multiply LU by hand and confirm that LU = A. Now use Matlab to multiply LU and save your answer in a variable named ans2. Is this close to A? If we switch the rows of A, we get a new matrix TO B=610-20 ) It is easy to check by hand that the LU decomposition of B (without reordering the rows) is 1.= (10-20) and U = 0 1 - 10-20 Multiply LU by hand and confirm that LU = B. Now use Matlab to multiply LU and save your answer in a variable named ans3. Is this close to B? (Note: This problem is supposed to be very easy. You should just type the matrices L and U directly for each problem. You should not use the lu command for either part. It is, however, worth checking what happens if you use the lu command. What does lu(A) give you? What about lu(B)? Why do you think this happens?)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started