MathGroup Archive 1997

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

Search the Archive

Re: subscripted variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9778] Re: subscripted variables
  • From: Bruce Wolk <bawolk at ucdavis.edu>
  • Date: Fri, 28 Nov 1997 05:34:56 -0500
  • Organization: University of California, Davis
  • Sender: owner-wri-mathgroup at wolfram.com

William S. Graves wrote:
> 
> I would like to use variables with subscripts just like any variable.
> There seem to be a couple of problems with evaluation.
> 
> Problem 1) I would like to use a subscripted variable as a function
> argument, for example:
> 
> In[1]= f = Function[{Subscript[t,i]}, Subscript[t,i]^2;
> 
> Function::"flpar" :
>     "Parameter specification {Subscript[t,i]} in
> Function[{Subscript[t,i]}, Subscript[t,i]^2] should be a symbol or list
> of symbols.
> 
> Problem 2) Another problem with evaluation:
> 
> In[1]= Subscript[t,i] = 1.0
> Out[1]= 1.
> 
> In[2]= ?Subscript[t,i];
> 
> Information::ssym:
>     Subscript[t,i] is not a symbol or a string.
> 
> How can I make these statements work???? Thanks,
> Bill Graves (wsgraves at bnl.gov)

The easiest solution is to use the Notation utility.  You can load it
with

<<Utilities`Notation`

The documentation is in the Documentation subdirectory of the Utilities
subdirectory.


  • Prev by Date: outputting lists
  • Next by Date: Mathlink with java or VB
  • Previous by thread: Re: subscripted variables
  • Next by thread: Re: subscripted variables