MathGroup Archive 1998

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

Search the Archive

Re: Evaluate In Place


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12013] Re: Evaluate In Place
  • From: Paul Abbott <paul@physics.uwa.edu.au>
  • Date: Fri, 17 Apr 1998 03:40:49 -0400
  • Organization: University of Western Australia
  • References: <6ghm3c$lto@smc.vnet.net>

Des Penny wrote:

> I find the new feature (at least I think it's new with V3.0) of
> Evaluating In Place to be extremely useful for debugging purposes.
> Since I haven't seen it discussed in this forum I thought a note might
> be appropriate.
>
> The command is executed by selecting part of the input line and
> executing the pull down command Kernel>Evaluation>Evaluate In Place.

Another nice application of Evaluate In Place is to generate
mathematically correct identities.  This is a bit hard to describe in
ASCII but if you have a text cell with an inline equation of the form

	"text" Integrate[Sin[x],{x,0,Pi}]=Integrate[Sin[x],{x,0,Pi}] "more
text"

then if you select the Mathematica expression on the RHS of the = sign
and do Evaluate In Place you generate a mathematically correct
identity.

The Notebook session below demonstrates the before and after of this
idea:

Notebook[{
Cell[TextData[{
  "Identity ",
  Cell[BoxData[
      \(TraditionalForm
      \`\[Integral]\_0\%\[Pi]\( sin(x)\) \[DifferentialD]x = 
        \[Integral]\_0\%\[Pi]\( sin(x)\) \[DifferentialD]x\)]],
  "."
}], "Text"],

Cell[TextData[{
  "Identity ",
  Cell[BoxData[
      FormBox[
        RowBox[{\(\[Integral]\_0\%\[Pi]\( sin(x)\) \[DifferentialD]x\),
"=", 
          FormBox["2",
            "TraditionalForm"]}], TraditionalForm]]],
  "."
}], "Text"]
}
]


Cheers,
	Paul 

____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul@physics.uwa.edu.au  AUSTRALIA                            
http://www.pd.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________



  • Prev by Date: Re: Numbered Equations?
  • Next by Date: Re: A Monte Carlo Simulation with loop structure
  • Prev by thread: Evaluate In Place
  • Next by thread: Unexpected behaviour with Series/Integrate/Normal