Re: Extracting a sub-list?
- To: mathgroup at smc.vnet.net
- Subject: [mg37947] Re: [mg37933] Extracting a sub-list?
- From: "milkcart" <milkcart at m17.alpha-net.ne.jp>
- Date: Thu, 21 Nov 2002 00:38:16 -0500 (EST)
- References: <200211201409.JAA06448@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Mr.AngleWyrm You can use Select rather than mapping IntegerQ to list. Table[x/2, {x, 1, 5}] Select[%, IntegerQ] > 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 > >
- References:
- Extracting a sub-list?
- From: "AngleWyrm" <no_spam_anglewyrm@hotmail.com>
- Extracting a sub-list?