t=:'t0';'t1';'t2'
s=:'s0';'s1';'s2';'s3'
a=:((#s),#t)$'p1';'p1';'p1';'p2';'p2';'p2';'p1';'p2';'p1';'p2';'p1';'p1'


pT=: ('';t),s,.(]=[:<[){'';[
pS=: ('';s),t,.(([:|:])=[:<[){'';[

                             \--v--/
                                |
       a bit of Raul  ----------+     :-)        

Is this what you're looking for?

   'p1' pT a
+--+--+--+--+
|  |t0|t1|t2|
+--+--+--+--+
|s0|p1|p1|p1|
+--+--+--+--+
|s1|  |  |  |
+--+--+--+--+
|s2|p1|  |p1|
+--+--+--+--+
|s3|  |p1|p1|
+--+--+--+--+

   'p1' pS a
+--+--+--+--+--+
|  |s0|s1|s2|s3|
+--+--+--+--+--+
|t0|p1|  |p1|  |
+--+--+--+--+--+
|t1|p1|  |  |p1|
+--+--+--+--+--+
|t2|p1|  |p1|p1|
+--+--+--+--+--+


@@i
 

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

Reply via email to