Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 2
    $\begingroup$ Using ogerard's processing idea, one can use Pick to enhance performance: x = {2, 4, 6, 8, 10}; Pick[Range[Length[x]], Sign[x - 6], 1]. $\endgroup$ Commented Jan 18, 2012 at 20:46
  • 2
    $\begingroup$ I've noticed a preference for people below to use PatternTest rather than Condition. Are any performance differences or is it just what people are used to? $\endgroup$ Commented Jan 18, 2012 at 22:15
  • $\begingroup$ I prefer Condition for ease of naming elements to work with them. $\endgroup$ Commented Jan 19, 2012 at 1:05
  • 4
    $\begingroup$ This question is a good example of where some effort on WR's part to give useful simple examples in their documentation would make every's life a lot easier. This SHOULD be easy to find in the docs, but it's not. $\endgroup$ Commented May 7, 2016 at 6:13
  • $\begingroup$ just a point-free style {2, 4, 6, 8, 10} // Position[_?(GreaterThan[7])] $\endgroup$ Commented Oct 13, 2023 at 13:02