MHB Numerical analysis,results of methods

  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Numerical
AI Thread 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??
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...

Similar threads

Replies
15
Views
4K
Replies
38
Views
7K
Replies
27
Views
5K
Replies
1
Views
2K
Replies
1
Views
3K
Back
Top