Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12163
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How do I assign the solution obtained by FindRoot to a variable? |
| Date | 2012-10-24 07:43 +0000 |
| Message-ID | <k6866b$md5$1@smc.vnet.net> (permalink) |
| References | <k658dg$h6c$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
How do I assign the solution obtained by FindRoot to a variable? NS Lin <nansheng.lin@gmail.com> - 2012-10-23 05:02 +0000 Re: How do I assign the solution obtained by FindRoot to a variable? "Dr. Wolfgang Hintze" <weh@snafu.de> - 2012-10-24 07:32 +0000 Re: How do I assign the solution obtained by FindRoot to a variable? "Nasser M. Abbasi" <nma@12000.org> - 2012-10-24 07:43 +0000
csiph-web