This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Ax = b , where A is the same matrix as in the previous problem, the error after n iterations is approximately (1-c/N 2 ) n where c is a numerical value determined in the previous problem. Take b to be a random vector and use x exact = A \ b in Matlab to calculate the error. Now run x=jacobi(A,b,n) with n = 10 , 100 , 2000 and N = 50. Compare the errors to the errors estimated using the convergence factor by making a table. (4) As in problem 2, write a matlab function such that l = gseidelcvg(N) returns the con-vergence factor for Gauss-Seidel applied to the N N matrix A (same as in problem 2). If the convergence factor is expressed in the form 1-c/N 2 determine the value of c . Which converges faster Jacobi or Gauss-Seidel? 1...
View Full Document
This note was uploaded on 12/16/2011 for the course MATH 371 taught by Professor Krasny during the Fall '08 term at University of Michigan.
- Fall '08