MathGroup Archive 2003

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

Search the Archive

Re: Perform an assigment

  • To: mathgroup at smc.vnet.net
  • Subject: [mg43911] Re: Perform an assigment
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Sat, 11 Oct 2003 01:33:31 -0400 (EDT)
  • Organization: The University of Western Australia
  • References: <bm2u1n$6qd$1@smc.vnet.net> <bm5lvs$j59$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <bm5lvs$j59$1 at smc.vnet.net>,
 Jens-Peer Kuska <kuska at informatik.uni-leipzig.de> wrote:

> Hi,
> 
> don't do this use the rules returned by als Solve[] functions
> to replace the values of the symbolic variables in certain expressions.
> 
> {a, b, c} /. Solve[{a == 1, b == 2, c == 3}, {a, b, c}][[1]]
> 
> But if you insist to make assignments, something like
> 
> Set @@@ Transpose[{{a, b, c}, {a, b, c} /. 
>         Solve[{a == 1, b == 2, c == 3}, {a, b, c}][[1]]}]

This is a little verbose. Surely 

  Solve[{a == 1, b == 2, c == 3}, {a, b, c}] /. Rule -> Set

suffices?

Cheers,
Paul

-- 
Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au 
AUSTRALIA                            http://physics.uwa.edu.au/~paul


  • Prev by Date: RE: Simplifying Exponents
  • Next by Date: Re: Simplifying Exponents
  • Previous by thread: RE: Perform an assigment
  • Next by thread: Mouse wheel under Linux w/ 4.2/5.0