Extracting a sub-list?
- To: mathgroup at smc.vnet.net
- Subject: [mg37933] Extracting a sub-list?
- From: "AngleWyrm" <no_spam_anglewyrm at hotmail.com>
- Date: Wed, 20 Nov 2002 09:09:02 -0500 (EST)
- Reply-to: "AngleWyrm" <no_spam_anglewyrm at hotmail.com>
- Sender: owner-wri-mathgroup at wolfram.com
How do I extract the subset of answers in a list that are pure integers?
As an example,
in:
Table[x/2, {x, 1, 5}]
IntegerQ /@ %
out:
{ 1/2, 1, 3/2, 2, 5/2 }
{ False, True, False, True, False }
But I want to get a result of:
{ 1, 2 }
-:¦:-
AngleWyrm
- Follow-Ups:
- Re: Extracting a sub-list?
- From: Tomas Garza <tgarza01@prodigy.net.mx>
- Re: Extracting a sub-list?
- From: "milkcart" <milkcart@m17.alpha-net.ne.jp>
- Re: Extracting a sub-list?
- From: jmt <jmt@dxdydz.net>
- Re: Extracting a sub-list?