Gauss_seidel
function x= gauss_siedel (A,B)
A=[7 -1 -1;-1 10 2;1 -3 12]
B=[12 ;-6 ;41]
D=diag(diag(A))
E=tril(A)-D
F=triu(A)-D
A=D-E-F
G=-inv(D-E)*(F)
[n,m]=size(A)
for i=1:n
s=0;
for j=1:n
if j~=i
s=s+abs(A(i,j));
end
end
s
abs(A(i,i))
if(abs(A(i,i))> s)
disp('dcfrgvtr')
else
disp('gfhbjyu')
end
end
1
vote
Anonymous
shared this idea