Question: Scripts gael.m forsub.m backsub.m gaelscript.m 1) In this problem, you will convert a function that performs GE (Gaussian Elimination) to one that performs GEPP (Gaussian



Scripts
gael.m

forsub.m

backsub.m

gaelscript.m

1) In this problem, you will convert a function that performs GE (Gaussian Elimination) to one that performs GEPP (Gaussian Elimination with Partial Pivoting) a) Modify the function gael.m (posted in eLearning), so that it accepts only the A matrix as input, and produces only two outputs. One output will be the modified (overwritten) version ofA, which contains the multipliers in the lower triangular portion, along with the upper triangular matrix generated by GEPP. The other output will be the n x n permutation matrix P also generated during GEPP. Call your modified function gaelpp.m so that the first line is: function [A,P] -gaelpp () Hints: . You can use the MATLAB function eye) to initialize P . The MATLAB function /MJ = max(A(j:nj) will return an index 1 for the location of the maximum value of the column vector Aj:nj). Note that you will need to adjust this index and also use the absolute value. To swap rows, it will help to use a variable temp to temporarily store a row vector. .You wll also need to swap rows of P accordingly. . You need to overwrite appropriate entries of A with the multipliers instead of saving them in M. 1) In this problem, you will convert a function that performs GE (Gaussian Elimination) to one that performs GEPP (Gaussian Elimination with Partial Pivoting) a) Modify the function gael.m (posted in eLearning), so that it accepts only the A matrix as input, and produces only two outputs. One output will be the modified (overwritten) version ofA, which contains the multipliers in the lower triangular portion, along with the upper triangular matrix generated by GEPP. The other output will be the n x n permutation matrix P also generated during GEPP. Call your modified function gaelpp.m so that the first line is: function [A,P] -gaelpp () Hints: . You can use the MATLAB function eye) to initialize P . The MATLAB function /MJ = max(A(j:nj) will return an index 1 for the location of the maximum value of the column vector Aj:nj). Note that you will need to adjust this index and also use the absolute value. To swap rows, it will help to use a variable temp to temporarily store a row vector. .You wll also need to swap rows of P accordingly. . You need to overwrite appropriate entries of A with the multipliers instead of saving them in M
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
