%% a benign matrix... C = [ -727 -705 393 -999 -41 357 -890 166 731 603 -10 859 -247 55 802 -621 121 758 980 -4 -10 701 631 225 -544 ] x0 = single((1:5)') b = C*x0 %% leads to some trouble in G.E.... x = gauss_elim_vector(single(C), b) %% x - x0 %% ...that doesn't need to happen x1 = C\b %% x1 - x0 %% ...that can be solved with pivoting x = gauss_elim_vector_piv(single(C), C*x0) %x = gauss_elim_outer_piv(single(C), C*x0) %% x - x0