Beruflich Dokumente
Kultur Dokumente
of linear algebra to solve linear system of equations. This method is the generalization of
improvement on Gauss Seidel Method. Being extrapolated from Gauss Seidel Method, this
method converges the solution faster than other iterative methods.
In this tutorial, were going to write a program for Successive Over-Relaxation SoR method in
MATLAB, and go through its mathematical derivation and theoretical background.
where,
Now, decompose matrix A into Diagonal component matrix D, Lower triangular matrix L, and
upper triangular matrix U, such that:
A=D+L+U
where,
Rewrite the system linear equation as:
( D + L ) x = b [ U + ( 1 ) D ] x
During the iteration process, the left hand side of the equation is solved by using the previous
value for x on right hand side.
Where, x(k) is the kth approximation for x and x(k+1) is (k+1)th approximation for x.
Taking the advantage of triangular matrix form of ( D + L), the (k+1)th can be evaluated
sequentially by using forward substitution. The expression obtained for x(k+1) is:
The above code for Successive Over-Relaxation method in Matlab for solving linear system of
equation is a three input program. Here, matrix A, matrix B, and relaxation parameter are the
input to the program. The user defined function in the program proceeds with input arguments A
and B and gives output X.
When the program is executed in MATLAB workspace, it asks for the value of coefficient matrix
A and checks if it is square matrix or not. After getting valid input for A, another input matrix B
is required to be entered to the program which must be a column matrix. Finally, the relaxation
parameter is given as input and solution of linear equation comes as output.
While giving input to the program, the standard MATLAB syntaxes must be obeyed. Heres a
sample output of the MATLAB program for SOR method:
In this output of the Matlab program, 2x + y z = 8, -3x y + 2z = -11, and -2x + y +2z = -3
have been tried to be solved. But, the largest Eigen value of iterative matrix is not less than 1. As
a result of which, the problem here is not suitable for SOR method.