Re: Deleting expressions containing a certain head
- To: mathgroup at smc.vnet.net
- Subject: [mg126015] Re: Deleting expressions containing a certain head
- From: "wb at wavebounce.com" <rob at wavebounce.com>
- Date: Fri, 13 Apr 2012 04:46:05 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
I'm not sure this quite meets the challenge. For example, Exp[I Pi} is not Complex but it "has a complex number in it" and appears in the output. Perhaps this is as it should be. > Getting rid of any expression that has a complex number in it. > > How does one go about this? > list = {2^(Complex[2, 3]) + 3, 2, 3 x}; Select[list, FreeQ[#, Complex] &] hth, albert