RE: Using subscripts in function-parameter names

*To*: mathgroup at smc.vnet.net*Subject*: [mg71705] RE: [mg71653] Using subscripts in function-parameter names*From*: "David Park" <djmp at earthlink.net>*Date*: Mon, 27 Nov 2006 04:04:16 -0500 (EST)

Erik, You might look on MathSource at the WRI site for the SubscriptSymbols package by Ted Ersek. It makes it quite convenient to use subscripts in expressions. It loads the Notation package and handles all the symbolization for you. However, quite often you do not have to symbolize the subscript expressions and just loading the package, which institutes some extra definitions for Subscript, will be enough to solve your problem. The package comes with a notebook showing how to do a number of common things with subscript expressions. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: eriwik at student.chalmers.se [mailto:eriwik at student.chalmers.se] I'm quite new to using Mathematica and I'll probably not use it much in the future either, but right now I need to use it to calculate some values for comparison. My problem is that I can't get seem to get a function to work if the parameters have a subscript in the name. The following demonstrates the problem (copied from the notebook-file): (F[\(x\_1\) _, \(x\_2) _] := \[Sum]\+\(i = 1\)\%2 x\_i;\) Or put another way, a function F that takes two arguments Subscript[x,1] and Subscript[x,2] and runs a summation over Subscript[x,i] from i = 1 to 2. Now, this is quite a contrived example and could easily be expanded by hand, but what I need it for is much harder, with 8 parameters and nested summations. As I understand perhaps Utilities`Notation` could be used, but I don't understand how to use it. Could someone give a short demonstration (if that is the solution), perhaps on the above example? -- Erik Wikström