MathGroup Archive 2011

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

Search the Archive

Re: Position

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119219] Re: Position
  • From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
  • Date: Wed, 25 May 2011 06:59:01 -0400 (EDT)

On Wed, 25 May 2011, Joerg Schroeder wrote:

> Dear Group,
>
> I don't understand the following:
>
> I have a list of data and want to find the position of special elements:
>
> data=Table[CDF[BinomialDistribution[150,0.3],k],{k,0,150}]
>
> Position[data,#>=0.95&]
>
> With this I get {} (null set) as an answer, whereas for example Select gives the answer I expect.
>
> Select[data,#>=0.95&]
>
> Do I do something wrong with Position?
>
> Thanks
>
> Jorg Schroder
>

Joerg,

Position works like Cases:

Position[data, _?(# >= 0.95 &)]
Select[data, # >= 0.95 &]
Cases[data, _?(# >= 0.95 &)]

Oliver


  • Prev by Date: Again : Is there a BNF for Mathematica?
  • Next by Date: Re: Problem with Simplify and Assumptions
  • Previous by thread: Position
  • Next by thread: Re: Position