On 12/6/2009 12:53:23 PM, philipoakley wrote:
== I'd like a neat compact way of inserting one
matrix into another, sort of an
InsertMatrix(A,B,ir,ic), where one places the
matrix B into the matrix A starting at row ir and
column ic, with any spare bits of B (i.e. not
lying inside A) being ignored.
== I'm sure Stuart will have one in his library,
I'd just like one in the off-the-shelf mathcad
I think there is, depends what you mean. I'm
guessing that you mean A to remain the same size
but have B replace the original elements starting
at (ir,ic) - in which case my standard worksheet
library 'Vector Support Functions' includes
insertmat(main,sub,x,y) and insertvec(main,sub,x)
which do that. However, ...
== The limits for ir and ic would allow negative
entries such that B could overlap to the top and
left. (An alternative is an option that decides
if (ir,ic) is top left / bottom right
coordinate..)
They don't wrap. ... oh, all right, if you insist
Stuart