Re: Select from list
- To: mathgroup at smc.vnet.net
- Subject: [mg61067] Re: [mg61045] Select from list
- From: Pratik Desai <pdesai1 at umbc.edu>
- Date: Sun, 9 Oct 2005 01:35:27 -0400 (EDT)
- References: <200510080649.CAA20981@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Steven Taracevicz wrote:
>hi:
>
>I read a text file that gives me a list.
>nLevel[8, 10] = Import["output8_10.txt", "List"]
>
>{-10,-9,-7,-3,1,3,3,17}
>
>I have no problems calculating mean, variance etc. with the list.
>
>When I use:
>
>Select[nLevel[8,10], #<0]
>
>
You forgot to add an ampersand in your functional criteria
Select[nLevel[8,10], #<0&]
This will work
>yields
>
>{}
>
>despite negative elements.
>
>I cannot figure out why.
>
>Thanks,
>
>
>
Hope this helps
Pratik .
--
Pratik Desai
Graduate Student
UMBC
Department of Mechanical Engineering
Phone: 410 455 8134
- References:
- Select from list
- From: "Steven Taracevicz" <sftara@starshooter.com>
- Select from list