MathGroup Archive 2007

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

Search the Archive

Re: How to Eliminate


JikaiRF at aol.com wrote:
> Dear Members:
> When I use "Solve" in order to solve polynomials with high orders, its
> solutions are usually reterned in terms of a pair of nested braces,
> like {{x -> 0.1}, {x -> 0.5}}. In this situation, I would like to
> obtain a pair of braces such as {0.1, 0.5}.  In other words, I would
> like to know how to eliminate x ->.
> How can I obtain my result?
> 
>       Sincerely
>       F. Takata.

The solution for x is returned as a transformation rule. You can use the
replacement operator /. to apply the rule. See [1] for detailed information.

In[1]:=
sols = {{x -> 0.1}, {x -> 0.5}}

Out[1]=
{{x -> 0.1}, {x -> 0.5}}

In[2]:=
vals = x /. sols

Out[2]=
{0.1, 0.5}

Regards,
Jean-Marc

[1] _The Mathematica Book_, "1.4.2 Values for Symbols",
http://documents.wolfram.com/mathematica/book/section-1.4.2


  • Prev by Date: Re: How to Eliminate
  • Next by Date: ImplicitPlot errors
  • Previous by thread: Re: How to Eliminate
  • Next by thread: Re: How to Eliminate