octave-3.4.0:41> A=[1 -2 1 0; 0 2 -8 8; -4 5 9 -9]; octave-3.4.0:42> dispsysmat(A) Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 1.000000 x_3 = 0.000000 | 1.000000 -2.000000 1.000000 0.000000 | 0.000000 x_1 + 2.000000 x_2 + -8.000000 x_3 = 8.000000 | 0.000000 2.000000 -8.000000 8.000000 | -4.000000 x_1 + 5.000000 x_2 + 9.000000 x_3 = -9.000000 | -4.000000 5.000000 9.000000 -9.000000 | -- -- ans = Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 1.000000 x_3 = 0.000000 | 1.000000 -2.000000 1.000000 0.000000 | 0.000000 x_1 + 2.000000 x_2 + -8.000000 x_3 = 8.000000 | 0.000000 2.000000 -8.000000 8.000000 | -4.000000 x_1 + 5.000000 x_2 + 9.000000 x_3 = -9.000000 | -4.000000 5.000000 9.000000 -9.000000 | -- -- octave-3.4.0:43> Aprime=replacedisp(A,3,1,4); Replace row 3 by the sum of row 3 with 4.000000 times row 1: Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 1.000000 x_3 = 0.000000 | 1.000000 -2.000000 1.000000 0.000000 | 0.000000 x_1 + 2.000000 x_2 + -8.000000 x_3 = 8.000000 | 0.000000 2.000000 -8.000000 8.000000 | 0.000000 x_1 + -3.000000 x_2 + 13.000000 x_3 = -9.000000 | 0.000000 -3.000000 13.000000 -9.000000 | -- -- octave-3.4.0:44> Aprime2=scaledisp(Aprime,2,0.5); Scale row 2 by factor 0.500000: Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 1.000000 x_3 = 0.000000 | 1.000000 -2.000000 1.000000 0.000000 | 0.000000 x_1 + 1.000000 x_2 + -4.000000 x_3 = 4.000000 | 0.000000 1.000000 -4.000000 4.000000 | 0.000000 x_1 + -3.000000 x_2 + 13.000000 x_3 = -9.000000 | 0.000000 -3.000000 13.000000 -9.000000 | -- -- octave-3.4.0:45> Aprime3=replacedisp(Aprime2,3,2,3); Replace row 3 by the sum of row 3 with 3.000000 times row 2: Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 1.000000 x_3 = 0.000000 | 1.000000 -2.000000 1.000000 0.000000 | 0.000000 x_1 + 1.000000 x_2 + -4.000000 x_3 = 4.000000 | 0.000000 1.000000 -4.000000 4.000000 | 0.000000 x_1 + 0.000000 x_2 + 1.000000 x_3 = 3.000000 | 0.000000 0.000000 1.000000 3.000000 | -- -- octave-3.4.0:46> Aprime4=replacedisp(Aprime3,2,3,4); Replace row 2 by the sum of row 2 with 4.000000 times row 3: Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 1.000000 x_3 = 0.000000 | 1.000000 -2.000000 1.000000 0.000000 | 0.000000 x_1 + 1.000000 x_2 + 0.000000 x_3 = 16.000000 | 0.000000 1.000000 0.000000 16.000000 | 0.000000 x_1 + 0.000000 x_2 + 1.000000 x_3 = 3.000000 | 0.000000 0.000000 1.000000 3.000000 | -- -- octave-3.4.0:47> Aprime4=replacedisp(Aprime4,1,3,-1); Replace row 1 by the sum of row 1 with -1.000000 times row 3: Linear system Augmented matrix -- -- 1.000000 x_1 + -2.000000 x_2 + 0.000000 x_3 = -3.000000 | 1.000000 -2.000000 0.000000 -3.000000 | 0.000000 x_1 + 1.000000 x_2 + 0.000000 x_3 = 16.000000 | 0.000000 1.000000 0.000000 16.000000 | 0.000000 x_1 + 0.000000 x_2 + 1.000000 x_3 = 3.000000 | 0.000000 0.000000 1.000000 3.000000 | -- -- octave-3.4.0:48> Aprime5=replacedisp(Aprime4,1,2,2); Replace row 1 by the sum of row 1 with 2.000000 times row 2: Linear system Augmented matrix -- -- 1.000000 x_1 + 0.000000 x_2 + 0.000000 x_3 = 29.000000 | 1.000000 0.000000 0.000000 29.000000 | 0.000000 x_1 + 1.000000 x_2 + 0.000000 x_3 = 16.000000 | 0.000000 1.000000 0.000000 16.000000 | 0.000000 x_1 + 0.000000 x_2 + 1.000000 x_3 = 3.000000 | 0.000000 0.000000 1.000000 3.000000 | -- -- octave-3.4.0:49> diary off