Sunteți pe pagina 1din 2

Numerical Analysis DR.

Ahmed Amir Bayoumy Prepared By: Ahmed Shaban Mahmoud

Assignment NO.6

6-JAN-2011

a. b. c. d. e. f.

Write algorithm for Jacobi Algorithm Solve the above problem using Excel, MathCAD, Mat lab, Fortran, etc Solve the additional problem Discuss Convergence Criteria What is your chosen sequence of Elimination and why?

Solution
a. Jacobi Algorithm: Read matrix [ A ] For each off diagonal

aij

threshold = if threshold > 10- ( where is the desired convergence ) Calculate = tan-1 ( 2 aij / ( aii ajj ) ) Calculate cos & sin where cos has sign of aij & sin +ve Calculate Matrix [ N ] Store Matrix [ N ] Calculate matrix [ A ] = [ N ]T [ A ] [ N ] End End Calculate { Q } = [ N1 ] [ N2 ] [ N3 ] [ Nm ] { Q } where { Q }=[ I ] Write Eigen vector = { Q } & Eigen value = diagonal of [ A ]
Page 1 of 2

Numerical Analysis DR. Ahmed Amir Bayoumy Prepared By: Ahmed Shaban Mahmoud

Assignment NO.6

6-JAN-2011

b. Solve the example: In the attached excel sheet c. Solve the additional problem: In the attached excel sheet d. Discuss convergence criteria: -We may repeat until get the maximum threshold under desired value

Threshold = -Also we may put a convergence criteria for the Eigen values

< Desired value

Where is Eigen values (diagonal members of matrix [ A ] )

e. Chosen sequence of elimination :

Diagonal with maximum threshold =

Because matrix is small and searching for the maximum is costless.

Page 2 of 2

S-ar putea să vă placă și