Replace All and underscore in Mathematica
From: symbio (symbio_at_h0tmail.com)
Date: 10/10/04
- Next message: Daniel Lichtblau: "Re: Solving overdetermined equations"
- Previous message: Tim Brauch: "Re: How to deal with the numbers greater 10^308 or less than 10^(-308) in MATLAB?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 10 Oct 2004 05:27:54 GMT
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
- Next message: Daniel Lichtblau: "Re: Solving overdetermined equations"
- Previous message: Tim Brauch: "Re: How to deal with the numbers greater 10^308 or less than 10^(-308) in MATLAB?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|