Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

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

Search the Archive

Re: List Position

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15835] Re: [mg15740] List Position
  • From: "Tomas Garza" <tgarza at mail.internet.com.mx>
  • Date: Fri, 12 Feb 1999 18:39:55 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Harry Flynn wrote:
>Can anyone tell me how I find the position in a list of the first value
>less than or equal to zero.
>For example, how can I get Mathematica to tell me that in the list
>{{1},{1},{2},{8},{-3}}
>that the first value of interest to me is position 5.

Harry,
In[1]:=
listA={{1},{1},{2},{8},{-3}};

Position[-listA,{_?NonNegative}]//First//First Out[1]=
5

Good luck,

Tomas Garza
Mexico City


  • Prev by Date: Re: graphing inequalities
  • Next by Date: QM,physics, mathematica
  • Previous by thread: Re: List Position
  • Next by thread: Re: List Position