Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

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[44]:= relations =
{Less,LessEqual,Equal,GreaterEqual,Greater,Unequal};

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

In[46]:= Variables[v2]
Out[46]= {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?