It seems Roger is a mortal;

   s=: ?4 4$2
   (4&$.)^:_1 (4 $. s)
|domain error
   (4&$.)^:_1(4 $.s)

...or is my copy of J too old?

------------------------------------------------------------------------
|\/| Randy A MacDonald   | APL: If you can say it, it's done.. (ram)
|/\| [EMAIL PROTECTED]  |
|\ |                     | The only real problem with APL is that
BSc(Math) UNBF'83        | it is "still ahead of its time."
Sapere Aude              |     - Morten Kromberg
Natural Born APL'er      | Demo website: http://156.34.82.188/
-----------------------------------------------------(INTP)----{ gnat }-

----- Original Message ----- 
From: "June Kim" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Saturday, February 03, 2007 8:16 AM
Subject: [Jprogramming] Spare Matrix from Index Matrix


>    ]m=: 1 0 0, 0 1 0,: 0 1 0
> 1 0 0
> 0 1 0
> 0 1 0
>    ]i=:4$.$. m
> 0 0
> 1 1
> 2 1
>    ]m2=:1 (<"1 i)} 3 3$0
> 1 0 0
> 0 1 0
> 0 1 0
>    ]s=:$.m2
> 0 0 │ 1
> 1 1 │ 1
> 2 1 │ 1
>
> Can I get s from i without going through the dense matrix form?
>


----------------------------------------------------------------------------
----


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

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

Reply via email to