On Sun, Nov 2, 2008 at 8:16 PM, Graham Parkhouse
<[EMAIL PROTECTED]> wrote:
> sum=: 10 12 14 15 15 17 18 19 20 22 17 19 20 21 22 24 24 25 27 29
...
> Next I would like to get a list of the indices of sum whose values only
> appear once, i.e.
In addition to the answers in this thread, and in the wiki, you could have
used your original approach if you had arranged so that you could distinguish
between the index 0, and the fill used to arranged that ever cell of result
from your /. verb was the same shape. (And if you eliminated the extraneous
trailing dimension.
For example:
(, _1+sum ((1&[EMAIL PROTECTED])# ])/. 1+ i.#sum) -._1
0 1 2 6 13 17 18 19
Or,
(_1+sum ({. * 1=#)/. 1+ i.#sum) -._1
0 1 2 6 13 17 18 19
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm