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

**References**:**Extracting all the variables from a list of equations?***From:*ravanrip@yahoo.com (Ryan VanRiper (--))