Re: How to get elements satisfying specific condition from a list
- To: mathgroup at smc.vnet.net
- Subject: [mg123441] Re: How to get elements satisfying specific condition from a list
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Wed, 7 Dec 2011 06:16:02 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
You have to Flatten first:
Select[Flatten[Table[{x, y}, {x, 1, 6}, {y, 1, 6}],1], Total[#] > 9 &]
Bobby
On Tue, 06 Dec 2011 02:13:16 -0600, Nasser M. Abbasi <nma at 12000.org> wrote:
> On 12/5/2011 4:31 AM, Harvey P. Dale wrote:
>> You can use "Select" to do this. For example:
>>
>> Select[Table[{x, y}, {x, 1, 6}, {y, 1, 6}], Total[#]>9&]
>
> fyi, Using the above, I get on version 8.04
>
> In[11]:= Select[Table[{x, y}, {x, 1, 6}, {y, 1, 6}], Total[#] > 9 &]
>
> Out[11]= {}
>
> --Nasser
>
--
DrMajorBob at yahoo.com