Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to parse equations

  • To: mathgroup at
  • Subject: [mg91642] Re: [mg91621] How to parse equations
  • From: Bob Hanlon <hanlonr at>
  • Date: Sat, 30 Aug 2008 01:52:49 -0400 (EDT)
  • Reply-to: hanlonr at

Use Variables

eqns = {x[1] + y[1] + z[1], x[1] + 3 z[1] + u[1]^2, z[1] - u[1] - 16, 
   u[1] - 5};

Variables /@ eqns


Bob Hanlon

---- Stuart Nettleton <Stuart.Nettleton at> wrote: 

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!

UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly, and
with authority, states them to be the views the University of Technology,
Sydney. Before opening any attachments, please check them for viruses and

  • Prev by Date: Re: Mathematica and F#
  • Next by Date: Re: light-weight PC to run Mathematica?
  • Previous by thread: Re: How to parse equations
  • Next by thread: Monitoring/collecting evaluations