Re: Re: extracting variables from an expression
- To: mathgroup at smc.vnet.net
- Subject: [mg44175] Re: [mg44144] Re: extracting variables from an expression
- From: "Peter Pein" <nospam at spam.no>
- Date: Sat, 25 Oct 2003 06:26:25 -0400 (EDT)
- References: <bn8e5q$ngu$1@smc.vnet.net> <200310240824.EAA04338@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
vars[expr_]:=Union[Cases[expr,_Symbol?(!NumericQ[#]&),Infinity]] to avoid Pi, E, I etc. to be recognized as variables. Peter Pein, Berlin petsie at arcAND.de replace && by || to write to me ----- Original Message ----- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de> To: mathgroup at smc.vnet.net Subject: [mg44175] [mg44144] Re: extracting variables from an expression > Hi, > > Cases[x || y || z, _Symbol, Infinity] > > > Regards > Jens > > Peter Schinko wrote: > > > > Hi, > > > > I'm looking for a function that extracts all variables from a boolean > > expression. > > For example: > > x || y || z > > should return something similar to {x, y, z}. > > > > Is there a similar function in Mathematica? If so, how does it work? > > > > Thanks very much > > Peter >
- References:
- Re: extracting variables from an expression
- From: Jens-Peer Kuska <kuska@informatik.uni-leipzig.de>
- Re: extracting variables from an expression