Dear J forum members

   sum=: 10 12 14 15 15 17 18 19 20 22 17 19 20 21 22 24 24 25 27 29
   sum </. i.#sum
+-+-+-+---+----+-+----+----+----+--+-----+--+--+--+
|0|1|2|3 4|5 10|6|7 11|8 12|9 14|13|15 16|17|18|19|
+-+-+-+---+----+-+----+----+----+--+-----+--+--+--+

This shows me the indices of sum keyed to the value of the item each
represents, and shows which values only appear once. I can get this
precisely from

   sum (1&[EMAIL PROTECTED])/. i.#sum
1 1 1 0 0 1 0 0 0 1 0 1 1 1

Next I would like to get a list of the indices of sum whose values only
appear once, i.e.

0 1 2 6 13 17 18 19

Why doesn't this give it to me?

   sum ((1&[EMAIL PROTECTED])#])/. i.#sum
 0
 1
 2
 0
 0
 6
 0
 0
 0
13
 0
17
18
19

Is there an altogether different way to get the result I want?

Regards

Graham Parkhouse

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to