MathGroup Archive 2012

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

Search the Archive

Re: Deleting expressions containing a certain head


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



  • Prev by Date: Re: Replace a vertical line in ListPlot
  • Next by Date: How to access Solve solutions of eq.system as functions
  • Previous by thread: Re: Deleting expressions containing a certain head
  • Next by thread: Re: Deleting expressions containing a certain head