Re: Defining Solve results as variable

• To: mathgroup at smc.vnet.net
• Subject: [mg70040] Re: Defining Solve results as variable
• From: Roger Bagula <rlbagula at sbcglobal.net>
• Date: Sun, 1 Oct 2006 04:08:33 -0400 (EDT)
• References: <eflebs\$deg\$1@smc.vnet.net>

```Diana 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.
>
>
>Diana
>
>
>
Here is some code that works with combinatorial triangular sequences:
Table[Table[y[k_] = x /. Solve[Sum[Binomial[n, m]*x^m, {m, 0, n}] == 0,
x][[k]], {k, 1, n}], {n, 1, 5}]
Table[y[k], {k, 1, 5}]
Clear[y]
Table[y[k_] = x /. Solve[Sum[Binomial[n, m]*x^m, { m, 0, 5}] == 0,
x][[k]], {k, 1, 5}]
Table[y[k], {k, 1, 5}]

```

• Prev by Date: Re: showing variables in plots?
• Next by Date: Re: importing html files
• Previous by thread: Re: Defining Solve results as variable
• Next by thread: Re: Defining Solve results as variable