Second Term, AY 2018-2019
Second Term, AY 2018-2019
Faculty of Engineering
Electronics Engineering Department
Second Term, AY 2018-2019
PROBLEM 1: For the system of equations shown below, estimate the solution by using the two
methods discussed. Evaluate the convergence speed of both methods by using the error
tolerance є = 0.0001.
5X1 – X2 + X3 = 10
2X1 + 8X2 – X3 = 11
-X1 + X2 + 4X3 = 3
MATLAB Code:
Experiment 3
ECE-M421L: Numerical Methods for ECE Laboratory
PROBLEM 2: Create a function file for both methods, for the function name and arguments use
[x,k] = jacobi(A, b, epsilon) and [x,k] = gauss_seidel(A, b, epsilon). Where x is the solution, k is
the number of iterations, A is the matrix coefficient, b is the vector Right Hand Side coefficients
and epsilon is the error tolerance.
MATLAB Code:
Experiment 3
ECE-M421L: Numerical Methods for ECE Laboratory
CHALLENGE PROBLEMS:
1. Solve for the value of the systems of linear equation given below; use 8 iterations for
both Jacobi and Gauss – Seidel Method.
4+2 x+1.5 z
y=
7
x= y +7
3 x=2 y−9 z +5
JACOBI METHOD
GAUSS – SEIDEL
METHOD
8 I 2−8 I 3 −V S =−20
−4 I 1−8 I 2 +18 I 3 =0
−I 1+ I 2=10
MATLAB Code: