function GaussJordan(B)
     Matrix=Gauss(B)
     [n,m]=size(B);
     if n>1
       for u=n:-1:2
         v=1;
         while (v<=m && Matrix(u,v)<0.0001 && Matrix(u,v)>-0.0001)
           v=v+1;
         end
         if v<m+1
           for i=1:u-1
             Matrix(i,:)=Matrix(i,:)-Matrix(i,v)*Matrix(u,:);
           end
         end
       end
     end
Matrix
end

