446proj4 - 1 In Matlab this is c=ones(n,1 Define the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
MATH 446 / OR 481 SAUER SPRING 2010 Project 4 Gaussian Elimination and Error Magnification In theory, Gaussian Elimination computes the exact solution of a system of equations. This project explores what happens when we implement the algorithm in floating-point arithmetic. If we com- pute in double precision, can we expect solutions that are correct to double precision, or somewhat near to double precision? This would be equivalent to Relative Forward Error 10 - 16 . 1. Implement the Matlab code for Gaussian Elimination of Section 2.1 of the text (no row exchanges etc. need be done). Verify that your code is correct by demonstrating on a system Ax=b of four equations in four unknowns. Check your answer by multiplying A times your output x and comparing with b . 2. Define the n × n matrix A whose (i,j) entry is A ij = 2 i + 3 j ( i + j ) 2 . Define the “correct solution” vector c to have all components equal to
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 . In Matlab, this is c=ones(n,1) . Define the vector b=A * c . Then solve Ax = b for x using your Gaussian elimination code, and determine the relative forward error and relative backward error of your computed solution x . Make a table of RFE, RBE, and the ratio of the two Error Magnification Factor = RFE RBE for n = 6 , 8 , 10 , 12 , 14 . 3. Repeat Step 2 for the matrix B ij = 2 i + 3 j ( i + j ) 2 ( mod 1) . The matrix B consists of the fractional parts of the entries of the matrix A . You may want to use Matlab’s mod or rem command to find the fractional part of a number. Compare the results you obtained with matrix A with those of matrix B . Begin your report by answering the three questions above. Print out the Matlab code used and your Matlab session, and include these with your report. Due: Thurs., March 18...
View Full Document

This note was uploaded on 10/27/2010 for the course MATH 446 taught by Professor Staff during the Spring '08 term at George Mason.

Ask a homework question - tutors are online