This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: U. Washington AMATH 352  Winter 2010 Homework 3  Due on 01/29/10 The first two exercises should be submitted via Scorelator (4 attempts are available). Remember to use the command save with the flagascii to output your results. Upload only your .m files. 1. (10 points) The goal of the exercise is to program the Jacobi method, which is a basic iterative algorithm to compute an approximate solution to a linear system Ax = b . The algorithm goes as follows Set A , b , and . Set the matrix D with the diagonal part of A . Set x = . Define r = b Ax . while k r k 2 > , x = x + D 1 r . r = b Ax . end while The matrix D is a diagonal matrix with the same diagonal entries than A . The vector r is called the residual vector. Note that the residual is when x is equal to a solution. When the residual has a small norm, the corresponding vector x is an approximate solution. The Jacobi method computes such an approximate solution. Use the matrix and the right handJacobi method computes such an approximate solution....
View Full
Document
 Winter '07
 Leveque

Click to edit the document details