MathGroup Archive 2001

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

Search the Archive

Re: Replacing Parts of a List

  • To: mathgroup at smc.vnet.net
  • Subject: [mg28771] Re: Replacing Parts of a List
  • From: Roger Jones <rmj at SLAC.Stanford.EDU>
  • Date: Sat, 12 May 2001 01:36:39 -0400 (EDT)
  • Organization: Stanford Linear Accelerator Center
  • Sender: owner-wri-mathgroup at wolfram.com

To clarify

In[1]:=Subscript[x, y] = {1, 2, 3}

Out1]={1, 2, 3}

To replace the third element I must use :

In[2]:=Subscript[x, y] = ReplacePart[Subscript[x, y], 10, 3]

Out[2]={1, 2,10}

So that now Subscript[x, y] gives:

In[3]:=Subscript[x, y]

Out[3]={1, 2, 10}


This is unwieldy and I was hoping for a little more condensed notation.
However,
when using subscripts this appears appears to be the simplist notation
available.

-Roger Jones



  • Prev by Date: Re: How to make curved arrows?
  • Next by Date: Re: Bug in Integrate?
  • Previous by thread: Re: Replacing Parts of a List
  • Next by thread: Re: Replacing Parts of a List