%Minimalist elimination routine for square matrix, no pivoting, no scaling

function A = eliminate(A)
    n=size(A,1);
    for k=1:(n-1)
        for i=(k+1):n
            for j=(k+1):n
                A(i,j)=A(i,j)-(A(i,k)/A(k,k))*A(k,j);
            end;
            for j=1:k
                A(i,j)=0;
            end;
        end;
    end;
    count
end
