RE: Extraction of positive values from list of both +/- values
- To: mathgroup at smc.vnet.net
- Subject: [mg34643] RE: [mg34637] Extraction of positive values from list of both +/- values
- From: "Florian Jaccard" <jaccardf at eicn.ch>
- Date: Fri, 31 May 2002 04:26:18 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In[4]:=
DeleteCases[lstvals,x_/;x<0]
Out[4]=
{700,600,500,400,300,200,100,100}
Meilleures salutations
Florian Jaccard
EICN-HES
e-mail : jaccardf at eicn.ch
-----Message d'origine-----
De : O.A. Linares, M.D., Ph.D. [mailto:divinesaam at aol.com]
Envoyé : jeu., 30. mai 2002 08:55
À : mathgroup at smc.vnet.net
Objet : [mg34637] Extraction of positive values from list of both +/-
values
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