RE: Extracting the value from Solve
- To: mathgroup at smc.vnet.net
- Subject: [mg85773] RE: [mg85725] Extracting the value from Solve
- From: "Richard Hofler" <rhofler at bus.ucf.edu>
- Date: Thu, 21 Feb 2008 18:07:07 -0500 (EST)
- References: <200802201156.GAA25463@smc.vnet.net>
Lea,
This will give you a list containing one element, the value only.
Notice that I add " sol1 =" in order to give me an expression to work
with in the second step.
In[1]: sol1 = Solve[
Tan[45*Degree]*
x + (Sin[
108.25718805973634]*(-Sqrt[(-0.425185)^2 + 0.843815^2]))/
Sin[135*Degree] == 0, x]
In[2]: sol1 = Flatten[sol1 /. {x -> y_} -> {y} ] (* this gives you
something that you can use in later steps *)
Out[2]: {1.32538}
Is this what you want?
Richard
Richard Hofler
-----Original Message-----
From: Lea Rebanks [mailto:lrebanks at netvigator.com]
Sent: Wednesday, February 20, 2008 6:57 AM
To: mathgroup at smc.vnet.net
Subject: [mg85773] [mg85725] Extracting the value from Solve
Hi All,
After evaluating the following .
Solve[Tan[45*Degree]*x + (Sin[108.25718805973634]*
(-Sqrt[(-0.425185)^2 + 0.843815^2]))/
Sin[135*Degree] == 0, x]
{{x -> 1.3253773537632034}}
I wish to extract the value only . 1.3253773537632034
Any advice or help gratefully received.
Many thanks.
Best Regards - Lea Rebanks...
- References:
- Extracting the value from Solve
- From: "Lea Rebanks" <lrebanks@netvigator.com>
- Extracting the value from Solve