How to solve Gaussian Elimination?

59 Views Asked by At

I have matrix solved as-

1 1 1 0 | 1
0 1 0 1 | 1
0 0 1 1 | 0
0 0 0 1 | 0

Now I can solve it as

for i = n : -1 : 1  % go back from n to 1
    x(i) = bitand(dot(mat(i, i:n), x(i:n)) + mat(i, n + 1), 1);
end

   % where n = size of a matrix (column) 
   %       x() =  zeros

But actually I have the matrix in the decimal format like -

14 | 1
5  | 1
3  | 0
1  | 0

Now how do I solve it?