
On 07/26/2005 09:39 AM, Larry Evans wrote: [snip]
IOW:
1 2 ,/ 10 20
produces:
1 10 2 10 1 20 2 20
Actually, it produces 1 2 10 20 To get nearly what Alex wants, the following seems to work: <--------- cut here --------- r=: x ,"0/ y r 1 10 1 20 2 10 2 20 3 10 3 20 x 1 2 3 y 10 20 $r 3 2 2
--------- cut here --------- IOW, the result, r, is a 3 by 2 by 2 multi-dimensional array. I got this by downloading the J code as described here:
http://www.jsoftware.com/download_systems.htm and executing: jconsole and then simply trial-and-errored and reread: http://www.jsoftware.com/books/pdf/brief.pdf many times until I got something to work. The ,"0 causes , to be applied on rank 0 cells of the data (according to p. 16 of brief.pdf).