Re: subscripted function variables
- To: mathgroup at smc.vnet.net
- Subject: [mg50306] Re: [mg50287] subscripted function variables
- From: stephen layland <layland at wolfram.com>
- Date: Thu, 26 Aug 2004 06:50:53 -0400 (EDT)
- References: <200408250735.DAA19767@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
so spake Christopher Grinde [2004.08.25 @ 02:47]: > Is there a way to use subscriptewd variable names in functions? > > I have tried > > f[Subscript[u,1]_]:=Subscript[u,1]^2 > > but I am not able to make this work. because it won't. :) mathematica function definitions expect expressions with Head Symbol for function argument patterns, Subscript, in this case, is not a valid Head. If you really want subscripted function variables, check out the Notation package. this is definitely not a user friendly way of going about this, but it should work if you _really_ need it. <<Utilities`Notation` See the documentation of the notation package for more info. -ste\/e -- /*-----------------------------*\ | stephen layland | | Technical Support Engineer | | layland at wolfram.com | \*-----------------------------*/
- References:
- subscripted function variables
- From: "Christopher Grinde" <christopher.grinde@hive.no>
- subscripted function variables