In class, we learned how to perform Gaussian Elimination with Backwards Substitu
ID: 3804688 • Letter: I
Question
In class, we learned how to perform Gaussian Elimination with Backwards Substitution and wrote a function to accomplish this task in MATLAB. This was Gaussian Elimination (hereafter called GE) in its simplest form. However, there is an easy way to make this algorithm much more accurate and robust. We can introduce a process called pivoting (this is an expansion of the pivot row that we learned about in class). This strategy involves placing the element with the largest magnitude in the pivot position, such that the pivot clement is the largest of all elements in the pivot column. This way, when we calculate the multiplier used in successive steps to transform elements in each row, the magnitude of the multiplier will always be less than or equal to 1. This will reduce a type of error called "round-off" error. For more reading, see King and Moody, Numerical and Statistical Methods in Bioengineering, 2011. Here is a general explanation of the algorithm: First, we compare all of the elements in the same column. We use the max command in MATLAB to find the largest number in the column. Then, we swap the row containing the largest element with the pivot row. Now, our pivot row contains the largest clement. Recall that the syntax for the max function is [YI] = max(X) where X is the vector within which the maximum clement is searched, Y is the maximum clement of X, and I is the index of the maximum element. Additionally, we can use array indexing to enable the use of an array as an index for another array. For this problem, you should solve the following system of equations using greaterthanorequalto with pivoting: 0.001x_1 + 6.4x_2 = 4.801 22.3x_1 - 8x_2 = 16.3 To get you started, here are some suggested pseudocode changes that you can make to your algorithm to solve a system of n equations:Explanation / Answer
The MATLAB Teaching Codes consist of 37 short, text files containing
MATLAB commands for performing basic linear algebra computations.
These Teaching Codes are available as a single tar file, or
as individual text files.
You can download the Codes to your computer in two different ways.
[1] To Download The Teaching Codes As A Single Tar File
(a) Click on Tcodes.tar to access the tar file.
(b) With most browsers (Netscape, Explorer) a dialog box now appears,
and you can specify in which directory to save the tar file.
(c) Within a terminal window, move to the specified directory and
unpack the tar file by typing the command:
tar xvf Tcodes.tar
A new directory called Tcodes is created, and it contains all of the
MATLAB Teaching Codes.
[2] To View Or Download A Particular Teaching Code
The name of each MATLAB Teaching Code is listed below.
To VIEW a particular Teaching Code: click on its name.
To DOWNLOAD a particular Teaching Code: click on its name, then use
the menus on your Web browser to save the file to your computer.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.