In-Jae,

You can "stack" matrices, which would work here.  If top and bottom
are matrices with identical number of columns, then  top.stack
(bottom)  will return the right thing.  left.augment(right)  will
build up a matrix "sideways."  So for your question above:

sage: a=matrix(ZZ, 5, 20, [1]*(5*20))
sage: b=matrix(ZZ, 14, 20, [3]*(14*20))
sage: c=matrix(ZZ, 1, 20, [-1]*20)
sage: d = b.stack(c)
sage: ans = a.stack(d)

will duplicate Jason's matrix in ans (which I now see is not exactly
what you asked for).  With a couple more submatrices and "stacks"s you
could get the matrix you wanted without defining a function and
without thinking about 0-based indices.

Rob
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to