MHB Numerical analysis,results of methods

  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Numerical
Click For Summary
The discussion focuses on implementing the Jacobi and Gauss-Seidel methods in MATLAB for solving linear systems. The user seeks assistance in verifying the output of their code by providing specific example parameters, including an initial guess, matrix A, vector b, maximum iterations (MAXIT), and a small epsilon (ε). They present a sample matrix A, initial value x0, vector b, and the values for MAXIT and ε, asking for the expected solution. The goal is to ensure the implementation stops correctly based on the defined convergence criteria. Providing the solution for the given parameters will help validate the accuracy of the user's code.
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:
Mathematics 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??
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

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 7 ·
Replies
7
Views
2K
  • · 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 3 ·
Replies
3
Views
2K