Re: Is it a bug?
- To: mathgroup at smc.vnet.net
- Subject: [mg17603] Re: [mg17548] Is it a bug?
- From: "Richard Finley" <rfinley at medicine.umsmed.edu>
- Date: Mon, 17 May 1999 02:14:40 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Not so strange if you use FullForm to look at A....you will see that your
second expression has the Head "Complex" but your first expression Complex
is at a different level. To get what you want you could do something like
this:
myRule = x_/;Im[x] != 0
Cases[ A, myRule]
Out[] = { 1 + I Sqrt[2], 1 + 6 I }
regards, RF
>>> "F. Mittermayr" <mitterma at linz.vai.co.at> 05/13/99 11:13PM >>>
A = {1 + Sqrt[2] I , 1 + 2 * 3 I};
Cases[A, _Complex]
Out[1] = {1+6 I}
Isn't it a strange result?