clear all
clc

Aa = [-5 0 2 0 -1; 0 9 0 3 0; 2 0 5 0 2; 0 -2 0 4 0; -1 0 7 0 7];
bb = [8; 4; -8; -4; 0];
gauss_seidel(Aa,bb,0.00001,30);


Bb = [4 -1 -1 0 0; -1 4 -1 -1 0; -1 -1 4 -1 -1; 0 -1 -1 4 -1; 0 0 -1 -1 4];
cc = [-1; 2; 6; 2; -1];
gauss_seidel(Bb,cc,0.0000001,30);


A = [1 -3/4; -1/12 1];
b = [1; 1];
gauss_seidel(A,b,0.0000001,30);

Q=[1 -0.5; -0.5 1];
q = [1; 1];
gauss_seidel(Q,q,0.0000001,30);


N = [2 -1 1; 2 2 2; -1 -1 2];
n = [1; 1; 1];
gauss_seidel(N,n,0.0000001,30);


M = [1 2 -2; 1 1 1; 2 2 1];
n = [1; 1; 1];
gauss_seidel(M,n,0.0000001,30);