Ch-1-hw-final-김강섭

1918 days ago by matrix

A=vector([-2, 4, 3, 17, -6]) B=vector([7, -1, 0, 9, -12]) AA=A.inner_product(A) AB=A.inner_product(B) p=(AB/AA)*A w=B-p print "p=", p, "w=", w 
       
p= (-69/59, 138/59, 207/118, 1173/118, -207/59) w= (482/59, -197/59,
-207/118, -111/118, -501/59)
p= (-69/59, 138/59, 207/118, 1173/118, -207/59) w= (482/59, -197/59, -207/118, -111/118, -501/59)