Re: Symbol function, a question
- To: mathgroup at smc.vnet.net
- Subject: [mg90496] Re: [mg90476] Symbol function, a question
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 11 Jul 2008 02:01:38 -0400 (EDT)
- Reply-to: hanlonr at cox.net
x95 = 100 100 Use Set ( = ) again x95 = 45 45 But when it must be done programmatically ToExpression["x" <> ToString[95] <> " = " <> ToString[20]] 20 Bob Hanlon ---- tung tran <tunganhtr at yahoo.fr> wrote: ============= Hi everybody, I have a question needing your help. Firstly, I create a variable x95 = 100 Now, I want to change the value of my variable x95 to 20 , so I want to use some procedure like : Symbol["x" <> ToString[95]] = 20 my idea is to make Mathematica write the term "x95" automatically for me but when I use the Symbol function in this case, it gives me automatically 100 and I don' t know how to call only x95. Thank you if someone can give me a suggestion. Tung