Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribedimage text in transcribed

Scripts

gael.m

image text in transcribed

forsub.m

image text in transcribed

backsub.m

image text in transcribed

gaelscript.m

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Concepts, Theories, And Applications

Authors: Shui Yu, Song Guo

1st Edition

3319277634, 9783319277639

Students also viewed these Databases questions

Question

LO2 Compare three types of individual incentives.

Answered: 1 week ago