MathGroup Archive 1998

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

Search the Archive

RE: Variable Assignment

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14010] RE: [mg14007] Variable Assignment
  • From: Daniel CLEMENT <dclement at mail.cpod.fr>
  • Date: Mon, 14 Sep 1998 02:57:52 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

The result is a replacement rule for the variable x. If you want to use
it, you need the ReplaceAll instruction or its abridged form '/.'
(note the dot):

In[1]:= FindRoot[Exp[x] == x^2, {x, -0.5}] 
Out[1]= {x --> -0.703467}
In[2]:= a=x /. %
Out[2]= -0.703467
In[3]:= a 
Out[3]= -0.703467

Daniel CLEMENT

> ----- Original Message -----
> From:	wax [SMTP:wax at waxer.com]
> Sent:	Sunday, September 13, 1998, 8:45:09
> To:	mathgroup at smc.vnet.net
> Subject:	[mg14007] Variable Assignment
>
> FindRoot[Exp[x] == x^2, {x, -0.5}]
>
> {x --> -0.703467}
>
> How do I assign the result [-0.7033467] to a variable?
>
>
> ----- End Of Original Message -----




  • Prev by Date: Variable Assignment
  • Next by Date: Re: Variable Assignment
  • Previous by thread: Variable Assignment
  • Next by thread: Re: Variable Assignment