Re: changing replacement rule arrow ( ->) to equal sign(==)...
- To: mathgroup at smc.vnet.net
- Subject: [mg45918] Re: changing replacement rule arrow ( ->) to equal sign(==)...
- From: Harold.Noffke at wpafb.af.mil (Harold Noffke)
- Date: Thu, 29 Jan 2004 05:36:38 -0500 (EST)
- References: <bv83l0$idm$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Kim: You should recognize that ReplaceAll (/.) will work with the names of Mathematica functions (in your case, Rule (->) and Equal (==) ), but doesn't seem to work with their multi-character alias strings, even when these are enclosed in quotes ("->" and "=="). Perhaps someone can tell us why quoted symbol strings won't work when substituted for their associated function names. Using your posted equations, we have ... Mathematica 5.0 for Microsoft Windows Copyright 1988-2003 Wolfram Research, Inc. -- Terminal graphics initialized -- In[1]:= {G[0] -> 4*(5 - 2*Sqrt[6]), tfC[0] -> 2*(5 - 2*Sqrt[6]), C[0] -> 3 - Sqrt[6], tf[0] -> 3 - Sqrt[6]} /. Rule -> Equal Out[1]= {G[0] == 4 (5 - 2 Sqrt[6]), tfC[0] == 2 (5 - 2 Sqrt[6]), C[0] == 3 - Sqrt[6], tf[0] == 3 - Sqrt[6]} In[2]:= {G[0] -> 4*(5 - 2*Sqrt[6]), tfC[0] -> 2*(5 - 2*Sqrt[6]), C[0] -> 3 - Sqrt[6], tf[0] -> 3 - Sqrt[6]} /. "->" -> "==" Out[2]= {G[0] -> 4 (5 - 2 Sqrt[6]), tfC[0] -> 2 (5 - 2 Sqrt[6]), C[0] -> 3 - Sqrt[6], tf[0] -> 3 - Sqrt[6]} Regards, Harold