octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NDArray for median ??


From: Paul Kienzle
Subject: Re: NDArray for median ??
Date: Fri, 26 Mar 2004 23:07:12 -0500


On Mar 26, 2004, at 9:02 PM, Dmitri A. Sergatskov wrote:

David Bateman wrote:
Ok, in trying to also convert "median" to use NDArrays, I've come back
to the problem of converting "sort" first, as median uses the "sort"
...

This is somewhat off-topic. Technically one does not need to do a full
sort to get a median. I am just wondering how straightforward
would it be to modify 'sort' to just pickup the N-th element?
E.g. there is "select()" algorithm in the "Numerical Recipes"
which was faster than glibc's qsort() when I tried it.

Be aware that the usual statistical definition of median
averages the two middle values if there are an even number
of elements.  Will it still be faster than sort if you are
selecting the two middle values?

Paul Kienzle
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]