I can¹t reproduce the problem ?  I downloaded jsp601.ijs from ...
http://www.cs.ualberta.ca/~smillie/Jpage/jsp601.ijs

Then did ...
   a=:?17 100$1000
   $Q2 each <"1 |:a
100
   $Q1 each <"1 |:a
100
   $Q3 each <"1 |:a
100
   NB. Easier ...
   $Q2"1 |:a
100
   $Q1"1 |:a
100
   $Q3"1 |:a
100
   (Q3"1 |: a)  -: ;Q3 each <"1 |: a
1

>From this source, the definitions are...
   median
[: am midindices { sort
   am
+/ % #
   midindices
(<. , >.)@-:@<:@#
   sort
/:~

Regards, Rob Hodgkinson

PS: Maybe this should be added in to the Package Manager ? (with permission)


On 5/06/08 2:00 PM, "Raul Miller" <[EMAIL PROTECTED]> wrote:

> On 6/4/08, Bill Harris <[EMAIL PROTECTED]> wrote:
>> |index error: median
> 
> This must be because of the definition of median,
> which you did not supply.  I suppose I could look up
> jsp.ijs and see if I could figure out which definition you
> were using, but instead I will supply one which probably
> is different from yours:
>    mean=:+/%#
>    median=: mean@({~ (<.,>.)@-:@<:@#)@/:~
> 
> I suspect that my definition will not produce that
> index error.


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

Reply via email to