Subscripted variables and function definitions
- To: mathgroup at smc.vnet.net
- Subject: [mg65192] Subscripted variables and function definitions
- From: Geico Caveman <spam at spam.invalid>
- Date: Fri, 17 Mar 2006 00:13:34 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
I am trying to define a function (using the front end - I will be using
latex syntax in this post to make clear what I am doing) :
Now after this, if I try to output A[1,1,1], it just throws A[1,1,1] back.
However, if I define :
it gives the right answer. Two questions :
1. Why aren't subscripted variable names treated the same as other variable
names in this context ?
2. Is there a way to coax Mathematica into doing what I am trying to do
Mathematica is a nice system, but it has these highly irritating quirks.
Another (unrelated) question :
I have a 4x4 matrix which is a function of some variables :
A:=... (function of r1,r2,r3, ...)
f:=... (function of the same variables)
X:=Inverse[A] . f
Now, I want to extract a ratio :
X/(X+X) and assign it to a function :
A test evaluation of g[1,1,1] throws g[1,1,1] back. Makes no sense at all to
me. What am I missing, and why is Mathematica so unintuitive here ?
Prev by Date:
Re: getting one random number
Next by Date:
Re: Different font behavior between kernel and front-end
Previous by thread:
Re: A Reap Sow question
Next by thread:
Re: Subscripted variables and function definitions