cd=: (|. +/ ])@[EMAIL PROTECTED] (</.&, /: {./.&,[EMAIL PROTECTED]) ]
cd=: </.&.(|."1"_)

I should have called them diagonals instead of
counter diagonals.  It's </.y that gets the
counter diagonals (aka oblique lines).



----- Original Message -----
From: Roger Hui <[EMAIL PROTECTED]>
Date: Thursday, January 4, 2007 11:42 am
Subject: Re: [Jgeneral] Array-oriented proof?

...
> 4. cd G computes the list of counter-diagonals of a 
> square matrix, where
> 
> cd=: (|. +/ ])@[EMAIL PROTECTED] (</.&, /: {./.&,[EMAIL PROTECTED]) ]
> 
> For example, 
>   i. 5 5
> 0  1  2  3  4
> 5  6  7  8  9
> 10 11 12 13 14
> 15 16 17 18 19
> 20 21 22 23 24
>   cd i.5 5
> +--+-----+--------+----------+------------+---------+------+---+-+
> |20|15 21|10 16 22|5 11 17 23|0 6 12 18 24|1 7 13 19|2 8 14|3 9|4|
> +--+-----+--------+----------+------------+---------+------+---+-+

...
 

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

Reply via email to