I wrote: > diag0 =: =@/:`(0,:]$~2##)} > I'm sure improvements are possible.
Here's one; forget the merge:
diag1 =: (=@/:*]$~2##)
There may be a shorter way to express ]$~2## .
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
