Services & Resources / Wolfram Forums
MathGroup Archive
*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
  • Subject: [mg70034] RE: [mg70022] Defining Solve results as variable
  • From: "David Park" <djmp at>
  • Date: Sun, 1 Oct 2006 04:08:17 -0400 (EDT)


First@Solve[x + 1 == 2, x]
x1 = x /. %

{x -> 1}

David Park
djmp at 

From: Diana [mailto:diana.mecum at]
To: mathgroup at


I am trying to write a program which defines a variable with the
results of a Solve equation.

So, if I write


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,


  • Next by Date: Re: importing html files
  • Next by thread: Re: Defining Solve results as variable