Although this is not precisely what was asked for, here's a mechanism to
turn a boxed list of matrices into a diagonal:
diag=: ;@({."1&.>~ +/\@:([EMAIL PROTECTED]@$@>))
For example:
diag i.@,~&.> i.4
0 0 0 0 0 0
0 0 1 0 0 0
0 2 3 0 0 0
0 0 0 0 1 2
0 0 0 3 4 5
0 0 0 6 7 8
That said, diag M1;M2 would satisfy the original request (unless M1 or
M2 are sparse -- sparse arrays do not fit in boxes in J6).
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm