% Gausselimination ohne Pivotsuche
function x = gauss_einfach(A,b)
  
M = [A b];
n = length(b);

% Vorwaertselimination:
for j=1:n-1
  for k=j+1:n
    M(k,:) = M(k,:) - (M(k,j)/M(j,j)) * M(j,:);
  end
end

% Rueckwaerts einsetzen:
x = [zeros(n,1); -1];
for j=0:n-1
  x(n-j) = -M(n-j,:)*x / M(n-j,n-j);
end
x(n+1) = [];
