MathGroup Archive 2001

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

Search the Archive

Replacing Parts of a List


Given x={1,2} then setting part 1 to 10 (say) is done via x[[1]]=10.
This
appealing as it is a condensed notation and is  I believe, very
efficient for large
arrays.

However, with a subscripted symbol  (such as Subscript[x,y]) how is it
done?

It can be achieved with Subscript[x,y]=ReplacePart[Subscript[x,y],10,1]
but this is a little unwieldy.

Is there some method (using Hold[Subscript[x,y]] or something like this)

that allows a direct replacement?

Thank you!

-Roger Jones





  • Prev by Date: Plot Resolution
  • Next by Date: Re: list of bits to string
  • Previous by thread: Re: Plot Resolution
  • Next by thread: Re: Replacing Parts of a List