| 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)
| 2 | No.2 Revision |
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)
| 3 | No.3 Revision |
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)
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.