Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can grow your matrix row by row using method .stack():

R.<x,y,z>=ZZ['x, y, z']
f=x+y+z
L=[(2, 0, 0),(0, 1, 1),(0, 0, 2),(0, 0, 3),(0, 0, 4),(0, 0, 5)]
M = Matrix(0,len(L))
for (k,i,j) in L:
               g=x^i*y^j*f^k
               L1=vector(g[x^i*y^j*z^k] for (k,i,j) in L)
               M = M.stack(L1)
print(M)

You can grow your matrix row by row using method .stack():

R.<x,y,z>=ZZ['x, y, z']
f=x+y+z
L=[(2, 0, 0),(0, 1, 1),(0, 0, 2),(0, 0, 3),(0, 0, 4),(0, 0, 5)]
M = Matrix(0,len(L))
for (k,i,j) in L:
       g=x^i*y^j*f^k
       L1=vector(g[x^i*y^j*z^k] for (k,i,j) in L)
       M = M.stack(L1)
print(M)

You can grow your matrix row by row using method .stack():

R.<x,y,z>=ZZ['x, y, z']
f=x+y+z
L=[(2, 0, 0),(0, 1, 1),(0, 0, 2),(0, 0, 3),(0, 0, 4),(0, 0, 5)]
M = Matrix(0,len(L))
for (k,i,j) in L:
     g=x^i*y^j*f^k
     L1=vector(g[x^i*y^j*z^k] for (k,i,j) in L)
     M = M.stack(L1)
print(M)