Q=matrix(QQ, [[0,3,5],[3,-4,0],[5,0,6]])
print Q
b=vector([1.20736,-2.34066,-0.329193])
B=matrix([b])
C=Q.augment(B.transpose())
print C
C.swap_rows(1,0)
print C
C.add_multiple_of_row(2,0,-5/3)
print C
C.add_multiple_of_row(2,1,-20/9)
print C
C.rescale_row(2,-9/46)
print C
C.rescale_row(1,1/3)
print C
C.rescale_row(0,1/3)
print C
z = C[2,3]
y = C[1,3] - C[1,2]*z
x = C[0,3] - C[0,2]*z - C[0,1]*y
print x, y, z

Kreyszig-18.1 - 15-U (last edited 2010-12-18 07:59:10 by sri valli)