Re: How to parse equations

*To*: mathgroup at smc.vnet.net*Subject*: [mg91640] Re: How to parse equations*From*: Bill Rowe <readnews at sbcglobal.net>*Date*: Sat, 30 Aug 2008 01:52:27 -0400 (EDT)

On 8/29/08 at 4:25 AM, Stuart.Nettleton at uts.edu.au (Stuart Nettleton) wrote: >Hi, I am a bit stuck on how to convert the following set of >equations to a list of variables: >eqns = { >x[1] + y[1] + z[1], >x[1] + 3 z[1] + u[1]^2, >z[1] - u[1] - 16, >u[1] - 5}; >to give.. {{ x[1], y[1], z[1]},{x[1], z[1], u[1]},{z[1], >u[1],}, {u[1]}} >Any thoughts would be appreciated! Thanks, Stuart You have not specified any equation in your post. You have set the variable eqns to a list of expressions. Nor is it clear what it is you are attempting to achieve. You say you want a list of *variables* but do not specify any relationships between the variables you want and the expressions you start with. In your example, the part following "to give..." shows things of the form x[1] which is the function evaluated at 1, not a variable. If you provide more clarity as to what you are attempting to do I am sure you will get useful feedback here.