MathGroup Archive 2003

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

Search the Archive

Re: Help using variables with subscripts

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41355] Re: Help using variables with subscripts
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 16 May 2003 06:40:11 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <b9vi12$dsa$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

have you looked at the Utilities`Notation` package ?

In principle you habe to symbolize the 
subscripted variables. The problem is, that
Mathematica use Subscript[x,i] and associate this
with Subscript[] and not with x. 
If you wish to use Subscript[x,i] in a pattern 
you *must* symbolize it !

Regards
  Jens


"Earhart, Patrick" wrote:
> 
> Hello all
> 
> I wanted to see if any of you Mathematica Gods had any advice on ways to use variables with subscripts inside a function.
> 
> Ex
> In[1]:=
> f[x_] = x^2
> 
> Out[1]=
> \!\(x\^2\)
> 
> In[6]:=
> f[5]
> 
> Out[6]=
> 25
> 
> In[4]:=
> \!\(f1[\(x\_b\) _]\  = \ x\_b\^2\)
> 
> Out[4]=
> \!\(x\_b\%2\)
> 
> In[5]:=
> f1[5]
> 
> Out[5]=
> f1[5]


  • Prev by Date: Re: simulating a 2-state Markov process
  • Next by Date: Re: MatrixForm, decided not to work anymore....
  • Previous by thread: Help using variables with subscripts
  • Next by thread: Re: Help using variables with subscripts