MathGroup Archive 2006

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

Search the Archive

Re: Subscript assignment incompatibility??

  • To: mathgroup at
  • Subject: [mg71125] Re: Subscript assignment incompatibility??
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at>
  • Date: Thu, 9 Nov 2006 03:37:24 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <eisgrm$nk6$>

kevin_jazz wrote:
> I have another very simple problem:
> x={{1,28},{2,28}}
> Subscript[p,res]  = x
> x[[1]]=x[[1]]
> {1,28}
> Subscript[p,res][[1]] = Subscript[p,res][[1]]
> \!\(Set::"setps" : \ "\!\(p\_res\) in assignment of part is not a
> symbol."\)
> So, I can't make an assignment with a variable that has a subscript??

Right, you cannot.

According to the online help, the above message is
". Generated when a part assignment is used for the value of an 
expression other than a symbol.
. Part assignments are implemented only for parts of the value of a symbol."

Now, for Mathematica, a subscripted name is *not* a symbol. So you can 
either change the name as in the following example:


 From In[1]:=
Set::setps: x[1] in assignment of part is not a symbol.


This shows a valid part assignment.



Or use the *Symbolize* function from the package "Utilities`Notation`"


  • Prev by Date: Re: Possible bug concerning a limit computation
  • Next by Date: Re: Simplifying in Mathematica
  • Previous by thread: Re: Subscript assignment incompatibility??
  • Next by thread: Simplifying in Mathematica