Question: Exercise. Write a MATLAB function myplu for PLU factorization by modifying the previous function mylu.m. function [L,U,P] = myplu (A) & MYPLU PLU factorization (demo

 Exercise. Write a MATLAB function myplu for PLU factorization by modifying
the previous function mylu.m. function [L,U,P] = myplu (A) & MYPLU PLU

Exercise. Write a MATLAB function myplu for PLU factorization by modifying the previous function mylu.m. function [L,U,P] = myplu (A) & MYPLU PLU factorization (demo only--not stable!). & Input: square matrix & Output: P, L,U permutation, unit lower triangular, and upper triangular such that LUEPA % $ Your code here. % function [LU] mylu (A) % MYLU LU factorization (demo only--not stable!). % Input: A square matrix 8 Output: % LUunit lower triangular and upper triangular LUNA n = length(A); L = eye (n); $ ones on diagonal % Gaussian elimination for j = 1:n-1 for i = j+1:n L(1,1) - A(1,1) / A(1,1); * row multiplier Ali,j:n) = A(1,1:n) - L(1,3)+A(3, 1:n); end end U = triu (A); end

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!