MathGroup Archive 2011

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

Search the Archive

Re: Only real data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122129] Re: Only real data
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Sun, 16 Oct 2011 07:04:59 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110151003.GAA03159@smc.vnet.net>

You could do something like

Select[data1, (ComplexExpand[Im[#]]===0)&]

Heike


On 15 Oct 2011, at 12:03, J=F6rg Schr=F6der wrote:

> Hello,
>
>
>
> I have a problem to exclude complex solutions. I tried
>
>
>
> data1={2,3/4,1.3,=E4}
>
>
>
> {2,3/4,1.3,=E4}
>
>
>
> Cases[data1, Except[_Complex]]
>
>
>
> {2,3/4,1.3}
>
>
>
> and got, what I expected. But when I have data like
>
>
>
> {0,0,-I Sqrt[3],I Sqrt[3]}
>
>
>
> The above doesn't work. Is this due to a different Head? Is there an easy
> way to filter the non-complex data?
>
>
>
> Thanks in advance
>
>
>
> Greetings
>
>
>
> Joerg
>
>
>
> ################
>
> Dr. J=F6rg Schr=F6der
>
> Bremen, Germany
>




  • References:
    • Only real data
      • From: Jörg Schröder <HB-Kowalczyk-Schroeders@t-online.de>
  • Prev by Date: Re: How to create this kind of list
  • Next by Date: Re: How to create this kind of list
  • Previous by thread: Only real data
  • Next by thread: Re: Only real data