Re: Extraction of positive values from list of both +/- values
- To: mathgroup at smc.vnet.net
- Subject: [mg34668] Re: Extraction of positive values from list of both +/- values
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Fri, 31 May 2002 04:27:06 -0400 (EDT)
- Organization: Universitaet Leipzig
- References: <ad4je4$jlu$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I don't know how you can use Take[]
but
Select[listvals,Positive]
will do it.
Regards
Jens
"O.A. Linares, M.D., Ph.D." wrote:
>
> Dear Colleagues,
>
> I have a list of values:
>
> lstvals={700, 600, 500, 400, 300, 200, 100, -50, 100, -200, -300}
>
> I want to create a list that contains only the positive values. I know I can use
>
> lst=Take[lstvals, 7]
>
> The problem is, the size of the vectors vary. Help appreciated.
>
> Thanks,
>
> Oscar