kamakura wrote:
>  ]u=:?.3 4 5$10
>  In this case I would like to have the median value, 

           (1 { /:~)"1@:(0&|:) u
        1 5 3 4 4
        2 3 3 6 5
        5 8 3 8 2
        2 8 5 6 3
           
Or, for a little fun:

           ('';1;1) (1 { /:~@:,);.1 u
        1 5 3 4 4
        2 3 3 6 5
        5 8 3 8 2
        2 8 5 6 3

There might also be a way using insert  /  but nothing obvious springs to mind.

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

Reply via email to