MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Symbol function, a question

  • To: mathgroup at
  • Subject: [mg90496] Re: [mg90476] Symbol function, a question
  • From: Bob Hanlon <hanlonr at>
  • Date: Fri, 11 Jul 2008 02:01:38 -0400 (EDT)
  • Reply-to: hanlonr at

x95 = 100


Use Set ( = ) again

x95 = 45


But when it must be done programmatically

ToExpression["x" <> ToString[95] <> " = " <> ToString[20]]


Bob Hanlon

---- tung tran <tunganhtr at> 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.


  • Prev by Date: Defining Functions and Simplifying Solutions
  • Next by Date: Re: Almost symbolic computations (?)
  • Previous by thread: Symbol function, a question
  • Next by thread: Re: Symbol function, a question