Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*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 1993

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

Search the Archive

replacement rules and a simple list

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: replacement rules and a simple list
  • From: koleh%joyl.dnet at joyx.joensuu.fi
  • Date: Thu, 25 Feb 1993 09:46:50 +0300

Leon Poon asks if there is an easy way to turn the solutions of 
a Solve from a list of replacement rules to simply elements of 
a list. I think the following rule is very simple.


In[1]:= replace[{a_ -> b_}] := Replace[{a -> b}, {a -> b} -> b]

In[2]:= Solve[x^4==1,x]

Out[2]= {{x -> 1}, {x -> I}, {x -> -1}, {x -> -I}}

In[3]:= Map[replace,%]

Out[3]= {1, I, -1, -I}


Osmo Kolehmainen 





  • Prev by Date: Ordering Mma book
  • Next by Date: curve-fitting
  • Previous by thread: Recording Animation
  • Next by thread: curve-fitting