MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Select from list


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



  • Prev by Date: Re: Select from list
  • Next by Date: Re: LU factorization and solving algorithms in Mathematica
  • Previous by thread: Select from list
  • Next by thread: Re: Select from list