Numerical analysis,results of methods

  • Context:
  • Thread starter Thread starter evinda
  • Start date Start date
  • Tags Tags
    Numerical
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
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:

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

are valid.

Could you give me the results of an example with an initial value [tex]x_{0}[/tex],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]
[tex]x_{0}[/tex] =[0;0;0;0]
b=[1;2;3;4]
MAXIT=20
ε=0.00001

which should be the solution of x??