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??
 
Thread 'Erroneously  finding discrepancy in transpose rule'
Obviously, there is something elementary I am missing here. To form the transpose of a matrix, one exchanges rows and columns, so the transpose of a scalar, considered as (or isomorphic to) a one-entry matrix, should stay the same, including if the scalar is a complex number. On the other hand, in the isomorphism between the complex plane and the real plane, a complex number a+bi corresponds to a matrix in the real plane; taking the transpose we get which then corresponds to a-bi...

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