Question: (a) Write a MATLAB function A=myLU(A), with input matrix A and use the same matrix to store your the lower and upper triangular matrices L
(a) Write a MATLAB function A=myLU(A), with input matrix A and use the same matrix to store your the lower and upper triangular matrices L and U (see the top of page 105 for a way to do this). Test your code with the following matrix A = ? ? 1 ?1 3 1 1 0 3 ?2 1 ? ? . Display your output. (b) Write a MATLAB function [L, U, P]=myLUPP(A), which adds the pivoting procedure to the myLU function. The output L is the lower triangular matrix, U the upper triangular one, and P the permutation matrix. Test your code with the matrix in problem 3. Output the matrices L, U and P, and verify that LU = P A.

4. (a) Write a MATLAB function A-myLU(A), with input matrix A and use the same matrix to store your the lower and upper triangular matrices L and U (see the top of page 105 for a way to do this). Test your code with the following matrix 1 -1 3 A=11 10 3 -2 1 Display your output. (b) Write a MATLAB function [L, u, P]-myLUPP (A), which adds the pivoting procedure to the myLU function. The output L is the lower triangular matrix, U the upper triangular one, and P the permutation matrix. Test your code with the matrix in problem 3. Output the matrices L, U and P, and verify that LU = PA
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
