Question
Please help me with this matlab problem!! (a) Write a MATLAB function A=myLU(A), with input matrix A and use the same matrix to store your
Please help me with this matlab problem!!
(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.
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