You are on page 1of 7

Republic of the Philippines

CAVITE STATE UNIVERSITY


Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

Gauss Seidel

Introduction

Gauss–Seidel method is an iterative method to solve a set of linear equations and very

much similar to Jacobi’s method. This method is also known as Liebman method or the

method of successive displacement. This method was developed by German

mathematicians Carl Friedrich Gauss and Philipp Ludwig von Seidel. The method can be

applied to any matrix with non-zero diagonal elements. However, the convergence is only

possible if the matrix is either diagonally dominant, or symmetric & positive definite. The

process adopted by this method for solving a set of linear equations is as follows. In

numerical linear algebra, is an iterative method used to solve a system of linear equations.

Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean
Republic of the Philippines
CAVITE STATE UNIVERSITY
Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

The Gauss-Seidel method is the modification of the gauss-iteration method. This

modification reduces the number of iterations. In these methods the value of unknown

immediately reduces the number of iterations, the calculated value replaces the earlier value

only at the end of the iteration. . Because of it, the gauss-seidel methods converges much

faster than the Gauss methods. In gauss seidel methods the number of iteration method

requires obtaining the solution is much less as compared to Gauss method.

OBJECTIVES

1. To familiarize how to solve Jacobi method using different MATLAB commands and

functions.

2. To create source code that will attach to MATLAB command window.

3. To perform calculations and look for the value of X of an equation.

Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean
Republic of the Philippines
CAVITE STATE UNIVERSITY
Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

MATERIALS

1. Laptop / Personal computer

2. MATLAB Software / MATLAB Online

Procedure

1. Solving Gauss Seidel method automatically by the used of MATLAB software or

through online will help us to understand more on finding the value of our x. MATLAB Online

allows users to use a conventional web browser to access the newest version of MATLAB

while using MathWorks' hosted computation and storage resources.

2. MATLAB command window is the main window where we can type commands

directly into the MATLAB interpreter.

Input

Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean
Republic of the Philippines
CAVITE STATE UNIVERSITY
Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

3. Looking for easiest way of computing Gauss Seidel method using MATLAB is by

creating a source code. Source codes are created by a programmer with a text editor

or a visual programming tool and then saved in a file.

4. By familiarizing Gauss Seidel on manual computation will also help us to create and

understand more on creating our source code.

Output

5. Gauss-program Seidel's is simpler than the others since it employs a function. In the

meanwhile, it's simply a string in this application.

6. After doing the program you can employ the coefficient in order to solve for the

Gauss-Seidel Method.

Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean
Republic of the Philippines
CAVITE STATE UNIVERSITY
Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

Results and Discussions

A = input('Enter Coefficient Matrix A: ');


B = input('Enter Source Vector B: ');
P = input('Enter initial Guess Vector: ');
e = input('Enter your tolerance: ');
N = length(B);
X = zeros(N,1);
Y = X+1;
j = 1;
while abs(Y-X)>e
Y = X;
for i=1:N
X(i) = (B(i)/A(i,i)) - (A(i,[1:i-1,i+1:N])*P([1:i-1,i+1:N]))/A(i,i);
P(i) = X(i);
end
fprintf('Iteration no. %d\n',j)
X
j = j+1;
end

Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean
Republic of the Philippines
CAVITE STATE UNIVERSITY
Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

1. With the help of MATLAB in solving Gauss-Seidel will be much easier to do. It
has advantages and disadvantages the advantage is you can use it in thermal
radiation and for complicated research but its disadvantage it is not always used.
2.
3. The system requires the user to put a value by pressing the “ENTER” button. I
suppose that my value of co-efficient matrix A are [4 2 -2;1 -3 -1;3 -1 4].

4. Next, Gauss-Seidel method also has its constants that we need to consider which
is the source vector B. In this part, I used [0;7;5] as my value of constants.

5. Then, the value of the initial guess vector


must be entered. It is the value for our x that we need to substitute. I used [0;0;0]
as my initial guesses.

Conclusion:

The Gauss-Seidel technique is a good way to solve a system of simultaneous linear

equations because it allows you to manage the round-off error that comes with elimination

methods like Guassian Elimination. With the help of MATLAB in solving these Gauss-Seidel

it will give the students easy time rather than solving it manually. Students will save time by

using MATLAB to solve these Gauss-Seidel problems rather than tackling them manually.

And I concluded that Gauss-Seidel has a connection in Jaccobi Method. Because I both run

the equations in the program and it works. As electrical engineering in order to use the full

potential of the students. We need to know how and what functions can do.
Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean
Republic of the Philippines
CAVITE STATE UNIVERSITY
Don Severino de las Alas Campus
Indang, Cavite

COLLEGE OF ENGINEERING AND INFORMATION TECHNOLOGY


Department of Computer and Electronics Engineering

Prepared By: Reviewed By: Approved By:

Daniel T. Patosa Michael T. Costa David L. Cero


Signature Over Printed Name of Signature Over Printed Name Signature Over Printed Name
Faculty of Chairperson of College Dean

You might also like