({. ,.&.> }.)"1@:((1 1,:2 1)&(<;._3)) a
Henry Rich
On 12/11/2019 6:43 PM, Nimp O wrote:
Hello everyone,
Given
]a=: 3 4 $ 1 1 1 _1 4 2 1 _1 9 3 1 1
1 1 1 _1
4 2 1 _1
9 3 1 1
I want to find the submatrices:
f a
┌───┬───┬────┐
│1 1│1 1│1 _1│
│4 2│4 1│4 _1│
├───┼───┼────┤
│4 2│4 1│4 _1│
│9 3│9 1│9 1│
└───┴───┴────┘
I have a quite lengthy solution for this task.
I was wondering if anyone can come up with something more J-like and elegant
than what I have.
Thanks.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm