In numerical linear algebra, the Gauss–Seidel method, also known as the Liebmann method or the method of successive displacement, is an iterative method used to solve a linear system of equations. It is named after the German mathematicians Carl Friedrich Gauss and Philipp Ludwig von Seidel, and is similar to the Jacobi method. Though it can be applied to any matrix with non-zero elements on the diagonals, convergence is only guaranteed if the matrix is either diagonally dominant, or symmetric and positive definite. It was only mentioned in a private letter from Gauss to his student Gerling in 1823. A publication was not delivered before 1874 by Seidel.
Applied Numerical Methods Using MATLAB®
Author(s): Won Young Yang, Wenwu Cao, Tae‐Sang Chung, John Morris
First published:14 January 2005
Print ISBN:9780471698333 |Online ISBN:9780471705192 |DOI:10.1002/0471705195
Copyright © 2005 John Wiley & Sons, Inc.
Meysam Mahooti (2021). Gauss-Seidel Iterative Method (https://www.mathworks.com/matlabcentral/fileexchange/73488-gauss-seidel-iterative-method), MATLAB Central File Exchange. Retrieved .
From the source code in the while loop we can see this line:
x(:,k+1) = -inv(D+L)*(U)*x(:,k) + inv(D+L)*b;% Gauss-Seidel formula
The whole point of usign Gauss-Seidel iterative method is to not calculate the inverse of matrix A in the equation Ax = b.
Hence, this function is NOT an implementation of Gauss-Seidel iterative method.
What if I want to see the results of each iteration without checking the convergence? This code throughs wrong values if I remove those convergence checking code lines. Please help.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!