Re: Position
- To: mathgroup at smc.vnet.net
- Subject: [mg119222] Re: Position
- From: Roland Franzius <roland.franzius at uos.de>
- Date: Wed, 25 May 2011 19:30:56 -0400 (EDT)
- References: <irijmq$qck$1@smc.vnet.net>
Am 25.05.2011 11:55, schrieb Joerg Schroeder:
> 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?
Position searches patterns
Position[data, _?(# >= 0.95 &)]
--
Roland Franzius