MathGroup Archive 2001

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

Search the Archive

Re: Simple questions about Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31894] Re: Simple questions about Mathematica
  • From: atelesforos at hotmail.com (Orestis Vantzos)
  • Date: Mon, 10 Dec 2001 06:14:34 -0500 (EST)
  • References: <9uvhm2$ibq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The answer to your first question is NOT an easy one! You see
"substitution rules" or "transformation rules" are at the very core of
what Mathematica is, so there are a lot of things to learn about them.
Anyway here is a basic example:
Sqrt[a^2+b^2]+Exp[Sqrt[a^2+b^2]]/.Sqrt[a^2+b^2]->R
will return R+Exp[R]
What does it all mean?
expr/.Sqrt[a^2+b^2]->R means take expr and substitute all occurences
of Sqrt[a^2+b^2] with R
Read the Mathematica Book (which is available inside the Help menu),
specificaly the chapters concerning patterns and rules, and you will
find many interesting things that will get you started towards being a
full-fledged Mathematica programmer.
The answer to your second question IS simple: create a notebook with
your calculation and you can run it again whenever you want. If you
want to change something from one evaluation to another, define a
proper global variable and change that.
Orestis


  • Prev by Date: Re: reading data files
  • Next by Date: Re: Simple questions about Mathematica
  • Previous by thread: Simple questions about Mathematica
  • Next by thread: Re: Simple questions about Mathematica