>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Voc  !:  Help  Dictionary

Indices I.  1 _ _ Interval Index

I. y    (# i.@#) y
 
 

x is assumed to be sorted in ascending or descending order; ascending is assumed if all the items of x are the same. The comparison used in the ordering is not tolerant.

If y has the shape of an item of x , then x I. y is the least non-negative j such that j{x follows y in the ordering, or #x if y follows {:x in the ordering or if x has no items. In general, the search applies to the rank 0>.(#$x)-1 cells of higher-ranked y .
 


For example:
   I. 0 0 1 0 1 0
2 4

   ] x=: ?. 10$20
6 15 19 12 14 19 0 17 0 14
   10 I.@:< x
1 2 3 4 5 7 9

   0 2 2 5 I. _5 1 2 3 9 0
0 1 1 3 4 0

   histogram=: <: @ (#/.~) @ (i.@#@[ , I.)

   d=: +/ 10 1e6 ?.@$ 21  NB. data
   e=: 5 * i.40           NB. interval end-points

   h=: e histogram d
   $ h
40
   h
0 0 0 0 1 6 38 151 400 1093 2417 5274 9732 17014 26482 39266 
   54622 70277 85594 96077 101359 101033 94374 82241 67322 
   52201 36777 24419 15174 8526 4666 2091 880 348 99 34 12 0 0 0

   load 'plot'
   plot e;h



>>  <<  Usr  Pri  JfC  LJ  Phr  Dic  Voc  !:  Help  Dictionary