       Re: Extracting all the variables from a list of equations?

• To: mathgroup at smc.vnet.net
• Subject: [mg25497] Re: [mg25482] Extracting all the variables from a list of equations?
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Thu, 5 Oct 2000 23:50:17 -0400 (EDT)
• References: <200010030227.WAA06548@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```"Ryan VanRiper (--)" wrote:
>
> How would i go about extracting all the variables from a list of
> inequalities?
>
> If i had..   V = {v\$233Period > 0,  v\$234Period == v\$233Period,
> v\$236Period <=  v\$235Period}
>
> I would like to get a list that looks like the following..
>
> X = {v\$233Period, v\$234Period, v\$233Period, v\$236Period, v\$235Period}
>
> Then find all the unique elements to give an answer..
>
> Y = {v\$233Period, v\$234Period, v\$236Period, v\$235Period}

Here is one approach.

In:= relations =
{Less,LessEqual,Equal,GreaterEqual,Greater,Unequal};

In:= v2 = V /. Thread[relations->List];

In:= Variables[v2]
Out= {v\$233Period, v\$234Period, v\$235Period, v\$236Period}

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: Graphing, Symbolic Manipulation, and Regressions
• Next by Date: Re: writing mathematica script files for the math kernel under linux
• Previous by thread: Extracting all the variables from a list of equations?
• Next by thread: Re: Extracting all the variables from a list of equations?