MathGroup Archive 2004

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

Search the Archive

symbol replace


I am facing 2 problems with Mathematica:
 1st problem)
With replace all command,  when I use it with subscripts I get an unintended 
effect, this is what I do:
E * (Eo) /. E -> (Eo)
I intend to replace only E with Eo, but Mathematica instead replaces all E's 
with (Eo) and I get this instead:
(Eo) * (Eo)o
Please note the 'o' in Eo is supposed to be a subscript here and reads Enot. 
Can anyone please help?
here is the Mathematica code:

In[1]:=
\!\(E\ *\ E\_0\ /. \ E -> \ E\_0\)
Out[1]=
\!\(\[ExponentialE]\_0\ \((\[ExponentialE]\_0)\)\_0\)

2nd problem)
I like to use descriptive names for my variables with Underscore to separate 
the names, it's really easier to read, but of course underscore is a special 
character in Mathematica unfortunately, so is there an alternative??   For 
example, I like to use variable Dynamic_Energy_of_Stars_With_Sand = 123;  Is 
there something else equally as obvious as Underscore that maybe used for 
purpose of separting words in a variables names??

Thanks a lot for your help 


  • Prev by Date: Re: Constraints to parameters in FindFit?
  • Next by Date: Re: Re: Variance of sample and whole dataset
  • Previous by thread: Mini-Courses Provide Specialized Mathematica Training Online
  • Next by thread: Re: symbol replace