Question: MATLAB Write a function that will accept a matrix and return a matrix. The function should take the passed matrix and using Gauss Elimination put

MATLAB

Write a function that will accept a matrix and return a matrix. The function should take the passed matrix and using Gauss Elimination put zeros in the first column of the matrix. The first step is to put the row with the largest absolute value in the first row by swapping using two functions you wrote in a previous homework. Then calculate the factor necessary to multiply the first row by so that when it is added to the second row, the element in row 2 column 1 becomes zero. Use your linear combination function to accomplish this task. Then move down to the next row. Keep looping through the rows until all the elements in column 1, except row 1, are zero.

For example, if the matrix

egin{bmatrix} 1 &9 &4 &5 \ -11&-2 &3 &0 \ 0&-6 &5 &4 \ 3&5 &7 &-3 end{bmatrix}

is passed to the function, the function would return

egin{bmatrix} -11 &-2 &3 &0 \ 0&8.82 &4.27 &5 \ 0&-6 &5 &4 \ 0&4.45 &7.82 &-3 end{bmatrix}

1 945 -11 -2 3 0 3 794 -6 5 7 5 0 4 -3 -11 -2 0 8.82 0 -6 0 4.45 7.82-3 3 4.27 5 0 5 4

Step by Step Solution

3.48 Rating (164 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we will write a MATLAB function that performs Gaussian elimination to put zero... View full answer

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

Document Format (2 attachments)

PDF file Icon

6090336b54ea4_21551.pdf

180 KBs PDF File

Word file Icon

6090336b54ea4_21551.docx

120 KBs Word File

Students Have Also Explored These Related Mathematics Questions!