Thanks everyone! BTW, the orientation doesn't really matter, since I need all 4 diagonal directions anyway.
Am 10.07.2012 um 17:06 schrieb Raul Miller: > On Tue, Jul 10, 2012 at 10:16 AM, Rudi Mann <r...@happyplating.eu> > wrote: >> ]original=. 3 4$'ABCDEFGHIJKL' >> ABCD >> EFGH >> IJKL >> >> diag original >> A >> BE >> CFI >> DGJ >> HK >> L > > As Henry points out, verb/. gets diagonals and hands them off to > your verb. > > However, ]/. original has the wrong orientation. > > So to resolve that, use |./. original and then reverse each row in > the result: > > diag=:3 :0 > |."1 |./. y > ) > > or > > diag=: [: |."1 |./. > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm Rudi r...@happyplating.eu ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm