A=[1 2 -2; 1 1 1; 2 2 1];
b=[1 3 5]';
x0=[0 0 0]'; 
tolerantion=0.01;
max_iter=20;

[x,nm_error,iteraci,H_J]=jacobi(A, b, x0, tolerantion, max_iter);
[x,nm_error,iteraci,H_GS]=gauss_seidel(A, b, x0, tolerantion, max_iter);

disp(' Vlastni cisla iteracni matice Jacobiovy metody') 
 eig(H_J)

disp(' Vlastni cisla iteracni matice Gauss-Seidelovy metody') 
 eig(H_GS)






