MathGroup Archive 1996

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

Search the Archive

Re: ???? How to assign result from Solve to variable ????

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3836] Re: ???? How to assign result from Solve to variable ????
  • From: hohmuth at cipserv1.physik.uni-ulm.de (Lars Hohmuth)
  • Date: Mon, 29 Apr 1996 00:31:16 -0400
  • Organization: Uni Ulm
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4let71$e4m at dragonfly.wolfram.com> rpiyaket at ucsd.edu (Ram Piyaket) writes:
>From: rpiyaket at ucsd.edu (Ram Piyaket)
To: mathgroup at smc.vnet.net
>Subject: ???? How to assign result from Solve to variable ????
>Date: 22 Apr 1996 03:08:17 GMT

>Hi,
>I was wondering if anyone could tell me how to deal with this problem.
>I want to assign the numerical result that I obtain from the Solve or etc. 
>command, which typically enclosed in the braces ({...}) to a variable
>so that I can reuse it. I just want the numerical number, not the braces.
>Can you tell me how? I appreciate all the help from you. Thank you very much.

>Ram

I presume you want something like this:

In[1]:=

   Solve[3 x == 5,x]
Out[1]:=

{x->1.6667}

In[2]:=

y = x/.First[[%1]]  **This tells Mma to assign the first result of input 1to **

Out[2]:=

1.6667


Hope this helps,


Lars

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: Help on Function
  • Next by Date: TeX output form of Mathematica ; line length problems .
  • Previous by thread: Re: ???? How to assign result from Solve to variable ????
  • Next by thread: Re: ???? How to assign result from Solve to variable ????