       Re: Q: lefthand/right hand side of equation

• To: mathgroup at smc.vnet.net
• Subject: [mg26909] Re: Q: lefthand/right hand side of equation
• From: Brian Higgins <bghiggins at ucdavis.edu>
• Date: Fri, 26 Jan 2001 23:29:51 -0500 (EST)
• References: <94r6qo\$id2@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Robert, Here are some possibilities:

Use the Part function

LHS = eqn[[1, 1]]
LHS = eqn[[1, 2]]

Use a replacement rule

LHS = First[eqn /. y_ == z_ -> y]
RHS = First[eqn /. y_ == z_ -> z]

Cheers,

Brian

In article <94r6qo\$id2 at smc.vnet.net>,
Robert <robert.schuerhuber at gmx.at> wrote:
> 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
>
>

Sent via Deja.com
http://www.deja.com/

```

• Prev by Date: Multiply 2 Lists together in a certain way
• Next by Date: Mathemtica International Dictionaries
• Previous by thread: Re: Q: lefthand/right hand side of equation
• Next by thread: RE: Q: lefthand/right hand side of equation