RE: Position of element in a list
- To: mathgroup at smc.vnet.net
- Subject: [mg16352] RE: [mg16301] Position of element in a list
- From: "Jean-Marie THOMAS" <jmthomas at agat.net>
- Date: Thu, 11 Mar 1999 02:16:34 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Position[{-1,0,1},_?Negative] will give you your answer. Examine FullForm[-_] to understand the reason why! -----Original Message----- From: Roger Mason [mailto:rmason at sparky2.esd.mun.ca] To: mathgroup at smc.vnet.net Subject: [mg16352] [mg16301] Position of element in a list Hi, 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_] return {} So how do I perform this apparently simple task? Thanks, Roger Mason