Raul requested:
>  Given a vector, put it on the diagonal of an array
>  [concisely]

A minor shortening:

           diag0  =:   =@/:`(0,:]$~2##)}

I'm sure improvements are possible.

-Dan

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

Reply via email to