MathGroup Archive 2002

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

Search the Archive

Simple Concept I can't figure out! Making rules?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38046] Simple Concept I can't figure out! Making rules?
  • From: snarten at runbox.com (Stan)
  • Date: Thu, 28 Nov 2002 14:07:35 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Even though it's frowned upon by the engineering college, i use
mathematica a lot of the stuff that would take pages of code in
another system. I have most basic functions and operations down, but I am
lacking one basic thing I need to do to be able to program more
problems successfully:

here is my problem:

Lets say you solve an equation using "Solve"

Solve[2x - 1 == 0, x] // N

{{x -> 0.5}}

How would I then use the result of "Solve" (0.5) and assign it to a
new variable, like "answer"  for further calculations?

I think it has something to do with /. and -> rules of some sort, but
I can't get this simple concept to work!

Thanks for the help.

-Stan


  • Prev by Date: Re: Re: help with Export[...,"EPS"]
  • Next by Date: bug in Sum?
  • Previous by thread: [Newbie questions] function composition
  • Next by thread: bug in Sum?