(Q:) ReplacePart + SubMatrix replacement
- To: mathgroup at smc.vnet.net
- Subject: [mg7033] (Q:) ReplacePart + SubMatrix replacement
- From: "m.r." <schaferk at communique.net>
- Date: Fri, 2 May 1997 21:30:57 -0400 (EDT)
- Organization: Communique Inc.
- Sender: owner-wri-mathgroup at wolfram.com
greetings:
Mma3.0 has added a form of ReplacePart not found in Mma2.2.2:
?ReplacePart[expr,new,pos,npos]
ReplacePart[expr,new,pos,npos] replaces parts at positions pos
in expr by parts at positions npos in new.
For
A,B n-by-n, matrices,
K non empty subset of CartesianProduct[Range[n],Range[n]]
one can use
ReplacePart[A,B,K,{1,1}]
to replace the block A[[K]] with B[[1,1]]. (no problem)
what i wish ( though perhaps unrealistically) is
for
ReplacePart[A,B,K,K]
to replace the block A[[K]] with the block B[[K]].
am i misreading the above usage message for ReplacePart?
if so, how does one do a simple block replace in "one fell swoop"?
sincerely.
m. r.
email replies to
schaferk at tennessee.nrlssc.navy.mil