function x = GEnopivot(A,b)
% Raw Gaussian elimination without pivoting for 
% linear system Ax=b: "Linear algebra version", UNSTABLE!
[m,n] = size(A); A = [A,b];
% Forward elimination
for i=1:n-1
  if (A(i,i) == 0.0), error('Zero pivot'); end
  for j=i+1:n
    fac = A(j,i)/A(i,i);
    for k=i+1:n+1
      A(j,k) = A(j,k) - fac*A(i,k); 
    end
  end
end
% Backward substitution
x = [zeros(n-1,1);A(n,n+1)/A(n,n)];
for i=n-1:-1:1
  x(i) = A(i,n+1);
  for k=i+1:n
    x(i) = x(i) - A(i,k)*x(k);
  end
  x(i) = x(i)/A(i,i);
end