The generalization of the expressions {./:y and {.\:y,
namely the dyads (({/:) and ({/:~), will be supported
by special code in the next release. They can be
used to compute order statistics such as the median.
http://www.jsoftware.com/jwiki/Essays/Order_Statistics
Dan Bron already gave the direct answer to June Kim's
original question: (i.<./) and (i.>./) .
----- Original Message -----
From: Don Guinn <[EMAIL PROTECTED]>
Date: Sunday, October 12, 2008 7:27
Subject: Re: [Jprogramming] index of maximum value
To: Programming forum <[email protected]>
> How about
> {.\: ?. 30$100
> 9
>
>
> On Sun, Oct 12, 2008 at 9:00 AM, June Kim
> <[EMAIL PROTECTED]> wrote:
>
> > I can get the index of the maximum value easily, first getting the
> > maximum and then getting the index:
> >
> > I.@(=>./) ?. 30$100
> > 9
> >
> > Suppose, there is one presence of maximum value in the data.
> >
> > However, the solution isn't satisfactory to me. Is there a simple
> > single step way of finding the index of the max? That is, the way
> > where you don't need to scan the data twice(once for max,
> another for
> > index).
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm