Numerical analysis,results of methods

  • Context: MHB 
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Numerical
Click For Summary
SUMMARY

This discussion focuses on implementing the Jacobi and Gauss-Seidel methods in MATLAB for numerical analysis. The user seeks assistance in verifying the output of their code by providing an example with specific parameters: matrix A, initial value x0, vector b, maximum iterations MAXIT, and tolerance ε. The provided example includes A as a 4x4 matrix, x0 as a zero vector, b as a 4x1 vector, MAXIT set to 20, and ε set to 0.00001. The goal is to determine the solution vector x that satisfies the convergence criteria.

PREREQUISITES
  • Understanding of numerical methods, specifically Jacobi and Gauss-Seidel methods.
  • Familiarity with MATLAB programming and syntax.
  • Knowledge of convergence criteria in iterative methods.
  • Basic linear algebra concepts, including matrix operations and norms.
NEXT STEPS
  • Implement error handling in MATLAB for iterative methods.
  • Explore MATLAB's built-in functions for matrix operations.
  • Learn about convergence analysis for iterative methods in numerical analysis.
  • Investigate alternative iterative methods such as Successive Over-Relaxation (SOR).
USEFUL FOR

Students and professionals in mathematics, engineering, and computer science who are working with numerical methods and MATLAB for solving linear systems.

evinda
Gold Member
MHB
Messages
3,741
Reaction score
0
Hi!
I have written two codes in matlab,to implement the Jacobi and Gauss Seidel method.Both of the programs should stop either if the number of iterations surpass the maximum number of iterations MAXIT or if one of these conditions/or both of them:

\left \| x_{k}-x_{k-1} \right \|_{2}<ε , \left \| b-Ax_{k} \right \|_{2}<ε

are valid.

Could you give me the results of an example with an initial value x_{0},an array A ,a specific b,a specific MAXIT and a specific small number ε,so I can check my output?
 
Last edited:
Physics news on Phys.org
If,for example:

A=[3 2 1 5;6 2 1 3;5 5 6 1;1 2 3 9]
x_{0} =[0;0;0;0]
b=[1;2;3;4]
MAXIT=20
ε=0.00001

which should be the solution of x??
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 38 ·
2
Replies
38
Views
8K
  • · Replies 27 ·
Replies
27
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K