Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*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 smc.vnet.net
  • Subject: [mg50306] Re: [mg50287] subscripted function variables
  • From: stephen layland <layland at wolfram.com>
  • Date: Thu, 26 Aug 2004 06:50:53 -0400 (EDT)
  • References: <200408250735.DAA19767@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

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.

  <<Utilities`Notation`
  
  See the documentation of the notation package for more info.

    -ste\/e
--
/*-----------------------------*\
|       stephen layland         |
|  Technical Support Engineer   |
|     layland at wolfram.com       |
\*-----------------------------*/


  • 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