Actually,   ;@:(i.@:}:@:$ ,.&.> <@I.)  is little bit faster:

        
           coord0  =:  $ #: I.@,
           coord1  =:  ;@:(i.@:}:@:$ ,.&.> <@I.)


           b       =:  ?@:$&2
           ts      =:  6!:2 , 7!:2@:]
           fmt     =:  [: ,.&:>/ [: }.@:, (<4 1 $ ' ') ,. (;:'Name Time Space') 
,&.> '-' ,&.> [: <@:>"1@:|: [ ,. '0.3d' 8!:0 ] %"1 <./@:]


           M       =:  b 1000 10 10 100
        
           r       =: 20 ts&>  ' M' , L:0~ fn =. coord0`coord1
           
           fn fmt r
        Name   Time  Space
        ------ ----- -----
        coord0 1.414 1.380
        coord1 1.000 1.000
           
-Dan

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

Reply via email to