File Exchange

## Gauss-Seidel Method, Jacobi Method

version 1.0.0.0 (29.4 KB) by
The Jacobi and Gauss-Seidel Iterative Methods

Updated 29 May 2017

Refer: https://www3.nd.edu/~zxu2/acms40390F12/Lec-7.3.pdf
Jacobi Method:
Jacobi iterative method is an algorithm for determining the solutions of a diagonally dominant system of linear equations. Each diagonal element is solved for, and an approximate value is plugged in. The process is then iterated until it converges.

Gauss–Seidel method:
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.

### Cite As

Bhartendu (2020). Gauss-Seidel Method, Jacobi Method (https://www.mathworks.com/matlabcentral/fileexchange/63167-gauss-seidel-method-jacobi-method), MATLAB Central File Exchange. Retrieved .

Jonathan Acosta

André Frütel

Blake Charlton

Michael Hastings

Tijn Blommaert

If I use a random generated matrix for A and b e.g. A=randi(9,5) and b=randi(9,5,1) and as initial guess x=zeros(5,1) I get Inf or NaN for the values in the x matrix.

Vitor Gonçalves

sagar kumar dash

No One

Onkarnath Thakur

Faruk Öztürk

in jacobi method you need to change x(j) with xold(j) otherwise it's gauss seidel

Bhartendu

Code is shared for Learning and practising purpose. Solution given is valid and correct.

Pushpendu Ghosh

It's incorrect. Gauss Siedel and Jacobi give same output

Julien GUEGAN

In your example, you compare the 2 differents methods with differents initial guess ? That's doesn't seem relevant ... And if I use the same initial guess, the 2 methods have exactly the same convergence ....

Han Zhang

Modified Gauss-Seidel (G-S) Load Flow in IEEE 6 Bus System (Matlab)

Mais Alsharif

ML_Lab

No One

earth science learner

does not work for me wrong solution

NISHANT DHIMAN

Solve the nonlinear ordinary differential equation for the temperature distribution:

sagar kumar dash

Vidhula M.V

##### MATLAB Release Compatibility
Created with R2014a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux