MathGroup Archive 2012

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

Search the Archive

Re: How do I assign the solution obtained by FindRoot to a variable?


On 10/23/2012 12:02 AM, NS Lin wrote:

> I would like to store the root/solution obtained by the FindRoot[] function to a variable.
>How can I do that?
>


In[7]:= Clear[x]

sol=FindRoot[Sin[x]+Exp[x],{x,0}]
Out[8]= {x->-0.588533}

In[9]:= x=x/.sol
Out[9]= -0.588533

In[10]:= x
Out[10]= -0.588533





  • Prev by Date: Jan Brugard presents Wolfram SystemModeler workshop at the Technical
  • Next by Date: Eigenvalues works very slow
  • Previous by thread: Re: How do I assign the solution obtained by FindRoot to a variable?
  • Next by thread: Re: How do I assign the solution obtained by FindRoot to a variable?