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?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128487] Re: How do I assign the solution obtained by FindRoot to a variable?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Wed, 24 Oct 2012 03:33:27 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

On 10/23/12 at 12:54 AM, nansheng.lin at gmail.com (NS Lin) wrote:

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

Here is a simple example of how to do that

In[1]:= y = x /. FindRoot[x^2 - 10, {x, 2}];
y

Out[2]= 3.16228




  • Prev by Date: Re: How do I assign the solution obtained by FindRoot to a variable?
  • Next by Date: Re: How do I assign the solution obtained by FindRoot to a variable?
  • 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?