Re: format of "Solve" output
- To: mathgroup at smc.vnet.net
- Subject: [mg59932] Re: [mg59923] format of "Solve" output
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Fri, 26 Aug 2005 04:53:23 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
expr={{x->a+b,y->2 a+b}}; Apply[Equal,expr[[1]],{1}] {x == a + b, y == 2*a + b} Bob Hanlon > > From: Ed Peschko <esp5 at mdssdev05.comp.pge.com> To: mathgroup at smc.vnet.net > Date: 2005/08/25 Thu AM 06:34:33 EDT > Subject: [mg59932] [mg59923] format of "Solve" output > > 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 > >