Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'subscripts and functions' topicStudent Support Forum > General > Archives > "subscripts and functions"

Next Comment >Help | Reply To Topic
Author Comment/Response
Chelsea Stiller
06/04/09 4:00pm

Normally you create a function by

f[x_] := x+5

But I have variables that are subscripted
(I can't write them here so will use xsub1)

If I write f[xsub1_] := xsub1 +5 it doesn't work
whether the underscore is on the x level or the
sub1 level.

Since the expression is huge with many subscripted variables I didn't want to go in by
hand and change xsub1 to say x1. I tried

With[[xsub1=x1}, expression]

but that gives me an error

URL: ,

Subject (listing for 'subscripts and functions')
Author Date Posted
subscripts and functions Chelsea Stil... 06/04/09 4:00pm
Re: subscripts and functions VL 06/19/09 8:21pm
Re: subscripts and functions Mikel 06/24/09 1:56pm
Next Comment >Help | Reply To Topic