Data from 'stitching matrices' 'A B'=:3|L:0(([:<i.)"1)3 5,:5 4
BA=. 600$A BB=. (5r3*600)$B Observe execution times ts 'P=.BA ;@:(((=&{: |.)"1 <@# (,}.)"1)"1 _) BB' 1.70547 1.6588e7 ts 'Q=.BA ;@:(((=&{: |.)"1 <@# (,"1}."1))"1 _) BB' 1.00185 1.65882e7 ts 'R=.BA ;@:(((=&{:"1 |."1) <@# (,}.)"1)"1 _) BB' 1.56342 1.65882e7 ts 'S=.BA ;@:(((=&{:"1 |."1) <@# (,"1}."1))"1 _) BB' 0.856076 1.65885e7 P is the desired result. P-:"2 Q,R,:S 1 1 1 -- Met vriendelijke groet, @@i = Arie Groeneveld ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm