Question: Enter [ L , U , P ] = lu ( A ) to find the LU factorization of the matrix PA . Verify that

Enter[L,U,P]= lu(A)to find the LU factorization of the matrix PA. Verify that by computing P*A-L*U(assign this to variable ans1).
Use the LU factorizationyou found in part (1) to solve the system : first use the "\" command to solve the system (store the solution in the variable y) and then solve the system . Call the computed solution x_lu.
The exact solution to the system is the vector . Enter the vector xand compare your solution x_lu from part (2) with the exact solution xby computing norm(x_lu-x)(assign this to variable ans2)

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 Programming Questions!