Hello, i need  to assign the elements of matrix in the cycle, for
example here is the code (in a notebook):
#
var('a,b,c,d,e,f')
v1=vector([a,b,c])
v2=vector([d,e,f])
v3=matrix(1,3)
j=0
while j<=2:
    v3[0,j]=v1[j]*v2[j]
    j=j+1
print(v3)
#
I expect that it should give
(a*d,b*e,c*f)
but Sage says "TypeError: unable to convert x (=a*d) to an integer"
Is it possible to assign the elements of matrix in the cycle?

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to