Re: Can't use subscripted variables in function definition?
- To: mathgroup at smc.vnet.net
- Subject: [mg124271] Re: Can't use subscripted variables in function definition?
- From: Armand Tamzarian <mike.honeychurch at gmail.com>
- Date: Sun, 15 Jan 2012 04:49:45 -0500 (EST)
- Delivered-to: email@example.com
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
I should clarify that a bit because it was written in haste. Firstly I meant SubscriptVariable[NewContext`x, NewContext`i] but this isn't really a proper solution but reason I mentioned it was because if you have x_j and you want that to be a single symbol you run into problems if x or j or both are set to some other global value. With x_j and then x=2 you don't want 2_j you still want x_j returned. Symbolize addresses this but the point of the original comment is that is it nowhere near as straight forward as the other product to work with subscripts. Mike On Jan 14, 6:58 pm, Armand Tamzarian <mike.honeychu... at gmail.com> wrote: > For me it is not about looks because I think Mathematica typesetting/ > rendering is miles ahead of competitor products. It is about ease of > use. There is Symbolize in the Notations package which can get you > closer to something that works better but the best analogy i can think > of of how the other product works is if instead of Subscript you had a > function SubscriptVariable in which the subscript was a different > context e.g. SubscriptVariable[Global`x, NewContext`i] rendered as x > subscript i. > > Mike > > On Jan 10, 9:56 pm, Ralph Dratman <ralph.drat... at gmail.com> wrote: > > > > > > > > > Is this just a discussion about how things look on the screen -- or is > > there some deeper difference between Mathematica's "array" indices and > > properly-implemented subscripts? > > > Ralph > > > On Mon, Jan 9, 2012 at 3:16 AM, Armand Tamzarian > > > <mike.honeychu... at gmail.com> wrote: > > > On Jan 8, 8:26 pm, Bill Rowe <readn... at sbcglobal.net> wrote: > > >> On 1/7/12 at 5:25 AM, c... at comcast.net (Chris Young) wrote: > > > >> >What is the status of subscripted variables in Mathematica now? > > > >> It has not changed in version 8. > > > >> >Can't they finally be used as regular variables? > > > >> Yes, but not by default. You can use subscripted variables like > > >> ordinary variables using the Notation package. However, from my > > >> perspective this is more effort than it is worth. > > > >> >Or is there some workaround so that they can be? This is time-honor= ed= > , > > >> >very intuitive mathematical notation that should be available, IMO. > > > >> Yes, it would be useful to have subscripted variables fully > > >> integrated into Mathematica. And, that may well happen in some > > >> future version. But for now, it seems to me this is simply one > > >> of the limitations Mathematica has. > > > > I recently ported 90 pages of code from a competitor product -- mainl= y > > > used by engineers -- to Mathematica for someone. The code was heavily > > > subscripted because subscripted variables in the competitor product > > > were pretty easy and essentially worked out of the box the way you > > > would expect without a learning curve or any other issues. The were > > > other reasons to justify the port to Mathematica but it was quite enl= ig= > htening > > > to see code in which subscripted symbolic variables were so natural > > > and frankly made me wonder why Mathematica is behind the curve on thi= s.= > Lets > > > hope V9 offers this. > > > > Mike