Unformatted text preview: [x]=Jacobi(A,b,x) that implements Jacobi iteration (cf. pg. 347). (b) Write a MATLAB function [x]=GS(A,b,x) that implements Gauss-Seidel iteration (cf. pg. 347). (c) In both iterative methods let x k denote the approximate solution vector after the k-th iteration (where x is initialized to the zero vector). For both methods above, compute the norm of the residual r k = || b-Ax k || at each iteration where A = gallery(’poisson’,10); in MATLAB. Create a semilog plot showing the norm residual throughout iteration. (d) Repeat the previous problem on the matrix A = gallery(’poisson’,10) - 2*speye(100); . What happens? Hint: look at Theorem 2, pg. 349. 1...
View Full Document
- Fall '05
- Numerical Analysis, Gauss–Seidel method, Jacobi method, Iterative method, Doolittle, Matlab function