MathGroup Archive 1999

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

Search the Archive

Re: extracting lhs or rhs of equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16867] Re: extracting lhs or rhs of equations
  • From: bawolk at ucdavis.edu (Bruce Wolk)
  • Date: Mon, 5 Apr 1999 02:24:14 -0400
  • Organization: University of California, Davis
  • References: <7e1bmf$ba2@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 1 Apr 1999 21:57:19 -0500, "David P. Johnson"
<johnson at ae.msstate.edu> wrote:

>Let's say I have an expression like:
>
>  In[1]:= eq1= Sin[x] == x;
>
>Is there a way to get just the left-hand side or right-hand side of the
>equation? Something like:
>
>  In[2]:= LHS[eq1]
>  Out[2]:= Sin[x]
>
>TIA.
>
>-- 
>David
>->(Signature continues here)
>
David,

The following should help.  Part can refer to expressions as well as
lists.

In[1]:=  eq1= Sin[x] == x;
In[2]:= FullForm[eq1]
Out[2]//FullForm= Equal[Sin[x],x]
In[3]:= eq1[[1]]
Out[3]= Sin[x]

Cheers, Bruce


  • Prev by Date: Re: Output format of partial derivatives
  • Next by Date: Re: semi-transparent surfaces
  • Previous by thread: Re: extracting lhs or rhs of equations
  • Next by thread: How display negative contours with dashed lines?