MathGroup Archive 2001

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

Search the Archive

RE: Q: lefthand/right hand side of equation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26927] RE: [mg26872] Q: lefthand/right hand side of equation
  • From: "David Park" <djmp at earthlink.net>
  • Date: Fri, 26 Jan 2001 23:30:04 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

First, I got rid of the List brackets around your equation.

eqn = a + b == c + d;

l = First[eqn]
r = Last[eqn]
a + b
c + d

or

l = eqn[[1]]
r = eqn[[2]]
a + b
c + d

Check out Section 2.1 Expressions, and especially 2.1.4 Parts of Expressions
in the Book.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/



> From: Robert [mailto:robert.schuerhuber at gmx.at]
To: mathgroup at smc.vnet.net
> hello!
> maybe a rather simple question:
>
> if i have an equation, how can i get the left/right hand side?
>
> e.g.
>
> eqn={a+b==c+d};
>
> i'd like to get something like:
>
> l=a+b
> r=c+d
>
> thanks,
>
> robert




  • Prev by Date: Mathemtica International Dictionaries
  • Next by Date: Re: Extracting the name of a variable
  • Previous by thread: Re: Q: lefthand/right hand side of equation
  • Next by thread: RE: Q: lefthand/right hand side of equation