MathGroup Archive 1999

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

Search the Archive

Re: Position of element in a list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16378] Re: [mg16301] Position of element in a list
  • From: "Tomas Garza" <tgarza at mail.internet.com.mx>
  • Date: Thu, 11 Mar 1999 02:16:48 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Roger Mason wrote:

> I want to find the Position[] of negative elements in a list. The obvious
> methods do not work:
> 
> Position[{-1, 3, -2, 1}, -_]
> 
> and
> 
> Position[{-1, 3, -2, 1}, -x_]

Roger,

Position[{-1,3,-2,1},x_/;x<0]

does the trick.

Tomas Garza
Mexico City


  • Prev by Date: Date in Footers
  • Next by Date: Mathematica Problem
  • Previous by thread: Re: Position of element in a list
  • Next by thread: Re: Position of element in a list