Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 MStep 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