A (possibly) interesting variant:
rt=. |.&.:|:
</. rt i. 3 4
On 2013.06.11 08:22:09,
the extraordinary R.E. Boss spake thus:
> As shown in <http://www.jsoftware.com/help/dictionary/d421.htm>
> http://www.jsoftware.com/help/dictionary/d421.htm (/.) works on
> the diagonals parallel to the minor diagonal, which run from top-right to
> bottom-left:
>
>
>
> </. i.3 4
>
> +-+---+-----+-----+----+--+
>
> |0|1 4|2 5 8|3 6 9|7 10|11|
>
> +-+---+-----+-----+----+--+
>
>
>
> If you want to select the other diagonals, from top-left to bottom-right do
>
>
>
> <@|./.&.|. i. 3 4
>
> +-+---+------+------+---+-+
>
> |3|2 7|1 6 11|0 5 10|4 9|8|
>
> +-+---+------+------+---+-+
>
> Another example of under (&.) http://www.jsoftware.com/jwiki/Essays/Under
--
Nollaig MacKenzie
http://www.yorku.ca/nollaig
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm