Re: format of "Solve" output
- To: mathgroup at smc.vnet.net
- Subject: [mg59934] Re: [mg59923] format of "Solve" output
- From: "benshimo at bgumail.bgu.ac.il" <bsyehuda at gmail.com>
- Date: Fri, 26 Aug 2005 04:53:24 -0400 (EDT)
- References: <200508190831.EAA27442@smc.vnet.net> <200508251034.GAA10188@smc.vnet.net>
- Reply-to: benshimo at bgumail.bgu.ac.il
- Sender: owner-wri-mathgroup at wolfram.com
Hi, replacing your Out[25] with sol that is sol={{x -> a + b, y -> 2 a + b}}; Then there is no way that Fold[And, 1, Apply[Equal,sol[[1]], {1}]] will generate strings as you described. Actualy it generates, 1 && x == a + b && y == 2 a + b and FindInstance cannot process this yehuda On 8/25/05, Ed Peschko <esp5 at mdssdev05.comp.pge.com> wrote: > > hey all, > > I had a simple question that I can't find a simple answer for in the docs : > > When you solve an equation using 'Solve', it comes out in the format: > > {{ x -> a+b, y -> 2 a + b}} > > However, when you try to transform the equations for use in FindInstance, > say by using: > > > Fold[And, 1, Apply[Equal, %25[[1]], {1}]] > > you get: > > "x" == "a" + "b" && "y" + 2 "a" + "b" > > In other words, variables lose their variableness. So, when you > plug the results into, say, FindInstance it complains that "a" is not > a variable. > > Is there any reason for this? And how can you turn the character strings > back into variables? > > Thanks, > > Ed > >
- References:
- Nested Lists, Definition and Evaluation.
- From: "Alexander" <beginning.physst@mail.ru>
- format of "Solve" output
- From: Ed Peschko <esp5@mdssdev05.comp.pge.com>
- Nested Lists, Definition and Evaluation.