Re: Problems with With/Block/Module functions
- To: mathgroup at smc.vnet.net
- Subject: [mg64274] Re: Problems with With/Block/Module functions
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Thu, 9 Feb 2006 02:44:40 -0500 (EST)
- Organization: Uni Leipzig
- References: <dsccna$pae$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, and the Notation packag with the Symbolize[] function help not ? Regards Jens "Mukhtar Bekkali" <mbekkali at gmail.com> schrieb im Newsbeitrag news:dsccna$pae$1 at smc.vnet.net... | Hi: | | I want to use local assignment done for a subscripted variable, where | x1 is ought to be read as x subscript 1, and evaluate at local values | function g[x1] and use the result later on. My code (not actual, just | an example) is as follows: | | x1=0; | With[{x1=1},y=g[x1]] (* is some specific arbitrary function, say x1^2 | *) | y | | My error message is "Local variable specification {x1=0} contains x1=0 | which is an assignment to x1; only assignments to symbols are allowed" | Where on earth does Mathematica see a function in x1. To me this is | just a symbol. Please advise on a workaround. Thanks. |