Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: [mg4997] Module and Block in Mathematica
Posted:
Oct 25, 1996 10:18 PM


At 0:41 96/10/17 0400, James R Gutman wrote: R Gutman>I want mathematica to let me use R Gutman>the Block and Module commands with R Gutman>variables that are of the form u[t], R Gutman>where t can take on various positive R Gutman>integer values. When I try to do this, R Gutman>mathematica tells me it isn't a R Gutman>symbol or an assignment to a symbol. R Gutman>What to do?
I'm not sure weather I have fully understood your problem or not.
But try "Module[ { u, t }, ..." instead of "Module[ { u[t] }, ...".
Just as, ==================================================== In[25]:= Module[ { u[t] }, u[t] = 55; u[t] += 100 ] From In[25]:= Module::lvsym: Local variable specification {u[t]} contains u[t] which is not a symbol or an assignment to a symbol. Out[25]= Module[{u[t]}, u[t] = 55; u[t] += 100]
In[26]:= Module[ { u, t }, u[t] = 55; u[t] += 100 ] Out[26]= 155 ====================================================
P.S. Gutman, why don't use Wolfram's Technical Support? Their response is quick and precise. Email address is: Technical Support <support@wolfram.com>
* Yokoi Takahisa <yokoi@skk.is.tohoku.ac.jp> ** Graduate School of Information Science, *** Tohoku Univ. <Tonpei>, Sendai, Japan



