Alternative formulation of Steven's idea. ((2 | i.@#) ]/. ]) i. 6 3 0 1 2 6 7 8 12 13 14
3 4 5 9 10 11 15 16 17 On Nov 21, 2012 5:58 AM, "Stefano Lanzavecchia" <[email protected]> wrote: > How about key? > > (3 : '>(2|i.#y)</.y') i. 6 3 > 0 1 2 > 6 7 8 > 12 13 14 > > 3 4 5 > 9 10 11 > 15 16 17 > > > > -----Original Message----- > > From: [email protected] [mailto:programming- > > [email protected]] On Behalf Of Alex Giannakopoulos > > Sent: Tuesday, November 20, 2012 5:51 PM > > To: [email protected] > > Subject: [Jprogramming] Splitting (re-arranging) a matrix > > > > OK, here is a simplified example of what I'm trying to do: > > I want to split a matrix into two, so that the result is composed of the > odd > > rows and even rows of the matrix respectively > > > > e.g. > > > > oddevenrows i. 6 > > 0 1 2 > > 6 7 8 > > 12 13 14 > > > > 3 4 5 > > 9 10 11 > > 15 16 17 > > > > I'm thinking, should I use select or cut or something else. Long day. > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
