MathGroup Archive 2002

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

Search the Archive

Re: Extraction of positive values from list of both +/- values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34672] Re: Extraction of positive values from list of both +/- values
  • From: Mark Westwood <MarkCWestwood at compuserve.com>
  • Date: Fri, 31 May 2002 04:27:19 -0400 (EDT)
  • References: <ad4je4$jlu$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

A simple approach would be something like: Select[list, #>0&].

Regards
Mark Westwood

"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


  • Prev by Date: Re: Extraction of positive values from list of both +/- values
  • Next by Date: Re: Help with Select[]
  • Previous by thread: Re: Extraction of positive values from list of both +/- values
  • Next by thread: Re: Extraction of positive values from list of both +/- values