Re: Treat subscripted variables as symbols
- To: mathgroup at smc.vnet.net
- Subject: [mg120930] Re: Treat subscripted variables as symbols
- From: "Alexey Popkov" <lehin.p at gmail.com>
- Date: Wed, 17 Aug 2011 05:52:46 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <j28emt$3fa$1@smc.vnet.net>
- Reply-to: "Alexey Popkov" <lehin.p at gmail.com>
You may try to use the SubscriptSymbols command from Andrew Moylan's package: http://sites.google.com/site/andrewjmoylan/mathematica http://sites.google.com/site/andrewjmoylan/Moylan.zip Description from the web-page: "This package makes Mathematica treat all the subscripts in your notebook as symbols. I used it for a long time because it's standard in physics to treat symbols like r, r0, and rcore as unique variables. If you set SubscriptSymbols = True, every expression with head SubscriptBox will be transparently converted into a symbol; and that symbol will display as the corresponding SubscriptBoxes on output. You won't normally need to know about the underlying proxy symbol, but you can use Information[] to find out its name." "Camille" <camille.segarra at gmail.com> wrote: news:j28emt$3fa$1 at smc.vnet.net... > Dear all, > > I try in mathematica to define a function using subscripted variables and > subscripted parameters. It seems however that mathematica is not able to > treat these subscripted variables as symbols. Indeed, when I use non > subscripted variables and parameters it "works". > > For example: > In: Function[##,Subscript[A, 2] Subscript[x, 1] ] & @@ {Subscript[A, 2]} > > Out:Function::flpar: Parameter specification Subscript[A, 2] in > Subscript[A, 2]\[Function]Subscript[A, 2] Subscript[x, 1] should be a > symbol or a list of symbols. > > But if I do: > In: Function[##,A x] & @@ {A} > Out: a\[Function]a x > (It is "working") > > Any Idea? > > Thanks in advance, > > Camille > > >>> >