Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Defining Solve results as variable

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70052] Re: [mg70022] Defining Solve results as variable
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sun, 1 Oct 2006 04:09:41 -0400 (EDT)
  • References: <200609300912.FAA13200@smc.vnet.net>

Because of the way the rest of the system works, you will probably
change your preferences soon. However, all you have to do is:

x1=x/.{{x->1}}[[1]]

On 9/30/06, Diana <diana.mecum at gmail.com> wrote:
> Hi,
>
> I am trying to write a program which defines a variable with the
> results of a Solve equation.
>
> So, if I write
>
> Solve[x+1=2,x]
>
> I get {{x -> 1}}
>
> I have not been able to figure out how to define a variable to the
> result, so that if I then type
>
> x1 = %, for example, it defines x1 as 1.
>
> I know this must be simple, but I didn't find it in the Help material.
>
> Thanks in advance,
>
> Diana
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: showing variables in plots?
  • Next by Date: RE: tableform question
  • Previous by thread: RE: Defining Solve results as variable
  • Next by thread: Re: Defining Solve results as variable