RE: Extraction of positive values from list of both +/- values
- To: mathgroup at smc.vnet.net
- Subject: [mg34663] RE: [mg34637] Extraction of positive values from list of both +/- values
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 31 May 2002 04:26:51 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Oscar,
Select[lstvals, Positive]
{700, 600, 500, 400, 300, 200, 100, 100}
Take[lstvals, 7]
{700, 600, 500, 400, 300, 200, 100}
actually misses one.
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
> From: O.A. Linares, M.D., Ph.D. [mailto:divinesaam at aol.com]
To: mathgroup at smc.vnet.net
>
> 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
>