MathGroup Archive 2003

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

Search the Archive

Re: Confusion between rules and variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42423] Re: Confusion between rules and variables
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Sun, 6 Jul 2003 06:57:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 7/5/03 at 3:11 AM, greenberg at ucdavis.edu (Jonathan Greenberg) wrote:

> I ran a FindRoot where the output was {x->0.543} -- How do I extact that
> value (0.543) for use in some other equation (e.g. How do I set a variable
> equal to 0.543, instead of that entire rule)?

Try

In[1]:=
x = x /. FindRoot[2*x + 3 == 0, {x, 0}]

Out[1]=
-1.5

In[2]:=
x

Out[2]=
-1.5


  • Prev by Date: NDSolve problem
  • Next by Date: Re: Confusion between rules and variables
  • Previous by thread: Re: Confusion between rules and variables
  • Next by thread: RE: Confusion between rules and variables