John Randall wrote:

    super
3 : '(2#y) $ 0 , (<: *: y) $ 1 , y#0'

can be written

super2=:_1=-/~@:i.

Let's see:

   -/~ i. 5
0 _1 _2 _3 _4
1  0 _1 _2 _3
2  1  0 _1 _2
3  2  1  0 _1
4  3  2  1  0

Wow! Immediate access to every diagonal. Great for your work with band matrices, and mine with upper triangulars.

Thanks,

Kip

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

Reply via email to