Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: subscripted function variables

  • To: mathgroup at
  • Subject: [mg50306] Re: [mg50287] subscripted function variables
  • From: stephen layland <layland at>
  • Date: Thu, 26 Aug 2004 06:50:53 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

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.

  See the documentation of the notation package for more info.

|       stephen layland         |
|  Technical Support Engineer   |
|     layland at       |

  • Prev by Date: Re: subscripted function variables
  • Next by Date: Re: Multiple Regression
  • Previous by thread: Re: subscripted function variables
  • Next by thread: Multiple Regression