Re: Q: Is there an "inverse" of ToRules?
- To: mathgroup at smc.vnet.net
- Subject: [mg31067] Re: [mg31038] Q: Is there an "inverse" of ToRules?
- From: Tomas Garza <tgarza01 at prodigy.net.mx>
- Date: Sat, 6 Oct 2001 03:33:00 -0400 (EDT)
- References: <200110050522.BAA03519@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
You may define your own. Example: In[10]:= b = Solve[x^2 - 2 == 0, x] Out[10]= {{x -> -Sqrt[2]}, {x -> Sqrt[2]}} In[11]:= ToExpression[StringReplace[ToString[b], "->" -> "=="]] Out[11]= {{x == -Sqrt[2]}, {x == Sqrt[2]}} But I think it is better to stick to the solution expressed in terms of rules. It takes a while to get used to it, but it pays. The rule has a definite meaning which can be used in a ReplaceAll operation, whereas something like the last output, with two "Equal" functions for the same x, can lead to confusion. Tomas Garza Mexico City ----- Original Message ----- From: "Mark S. Coleman" <mcoleman at bondspace.com> To: mathgroup at smc.vnet.net Subject: [mg31067] [mg31038] Q: Is there an "inverse" of ToRules? > > Greetings, > > Is there an "inverse" to the ToRules function? That is, a function > that converts rules to equations (expressed in == form), which could > then be used in the Solve function? > > Thanks, > > Mark
- References:
- Q: Is there an "inverse" of ToRules?
- From: "Mark S. Coleman" <mcoleman@bondspace.com>
- Q: Is there an "inverse" of ToRules?