Here is what I came with. The 0 _1 is top-left point of the "merged" rectangle, 
and 8 5 is bottom-right point.


   3 _1 (<./"1@(,.&0)@[ , 2&{.@] >. [ + _2&{.@]) 3 4 5 6
0 _1 8 5

Note that if instead of , you use -~

   3 _1 (<./"1@(,.&0)@[ -~ 2&{.@] >. [ + _2&{.@]) 3 4 5 6
8 6


you'll get the size of the rectangle.
-----
In trying to work more on this problem I have come 
up with the following intermediate problem for which I would 
like some help...

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to