MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

(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


  • Prev by Date: Q: why is 2D-FFT incredibly slow in Mma3.0 ??
  • Next by Date: Export of HTML/GIF broken on NextStep/Intel?
  • Previous by thread: Q: why is 2D-FFT incredibly slow in Mma3.0 ??
  • Next by thread: Re: (Q:) ReplacePart + SubMatrix replacement