0

Is it possible to use subscripts in Mathematica functions, for example

  f[Subscript[x, a] _] := x^2

However this doesn't seem to work, is there a way to allow indexed variables to behave in the same way as non-indexed variables?

Cheers

user27119
  • 2,500
  • 13
  • 34
  • 1
    But then, why do you need to do this? – J. M.'s missing motivation Jan 15 '17 at 19:22
  • I just prefer the notion style for readability. – user27119 Jan 15 '17 at 19:29
  • 4
    The best advice about working with Subscripts is: don't use them. See here, here, and here. – corey979 Jan 15 '17 at 19:41
  • 1
    @corey979 Duly noted. It can be done, its just probably not worth it. Lesson of the day don't use subscripts. – user27119 Jan 15 '17 at 20:01
  • 1
    @ corey979 This has been the common opinion for many years. However, recently I started to notice that the expressions with subscripts work in situations they have not work before, and started to use subscripts, especially in tensor expressions, being very careful in cross-checking the results with and without subscripts. It seems to work. May it be an improvement of the latest Mma version? – Alexei Boulbitch Jan 16 '17 at 07:42

0 Answers0