Re: ?
- To: mathgroup at smc.vnet.net
- Subject: [mg120856] Re: ?
- From: Gary Wardall <gwardall at gmail.com>
- Date: Sat, 13 Aug 2011 06:48:10 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201108101047.GAA26230@smc.vnet.net> <j20728$789$1@smc.vnet.net>
On Aug 11, 4:23 am, Tomas Garza <tgarz... at msn.com> wrote:
> Try
> In[1]:= x/.{x->0.49454545}Out[1]= 0.494545
> -Tomas
>
> > Date: Wed, 10 Aug 2011 06:47:21 -0400
> > From: david.kir... at onetel.net
> > Subject: ?
> > To: mathgr... at smc.vnet.net
>
> > The output of FindRoot[] when trying to find a root is like:
>
> > {x -> 0.49454545}
>
> > How can I convert that list, into the number 0.49454545?
>
> > In[1]:= FindRoot[x+9,{x,-5}]
>
> > Out[1]= {x -> -9.}
>
> > In[2]:= Head[%]
>
> > Out[2]= List
>
> > I can't seem to find any "normal" operations on the list which give me
> > the number.
>
> > Dave
Try:
FindRoot[x + 9, {x, -5}][[1]][[2]]
Gary Wardall
- References:
- How do I get a numeric value from FindRoot[] ?
- From: David Kirkby <david.kirkby@onetel.net>
- How do I get a numeric value from FindRoot[] ?