function x=gaussel(A,b)
  n=length(b);
  

 for k=1:n-1
    for i=k+1:n
      m=A(i,k)/A(k,k);
      for j=k:n
	A(i,j)=A(i,j)-m*A(k,j);
      endfor
      b(i)=b(i)-m*b(k);
    endfor
  endfor

  x(n)=b(n)/A(n,n);
  for i=n-1:-1:1
    sum=b(i);
    for j=i+1:n
      sum=sum-A(i,j)*x(j);
    endfor
    x(i)= sum/A(i,i);
  endfor
endfunction