RE: Extraction of positive values from list of both +/- values
- To: mathgroup at smc.vnet.net
- Subject: [mg34679] RE: [mg34637] Extraction of positive values from list of both +/- values
- From: "Annetts, Dave (E&M, North Ryde)" <David.Annetts at csiro.au>
- Date: Fri, 31 May 2002 04:28:30 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi Oscar, > 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. Select[lstvals, (# > 0) &] .... Regards, Dave. -------------------------------------------------------- Dr. David Annetts EM Modelling Analyst Tel: (+612) 9490 5416 CSIRO DEM, North Ryde Fax: (+612) 9490 5467 David.Annetts at csiro.au Include "usual_disclaimers" --------------------------------------------------------