comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Q: Quantil calculation in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Q: Quantil calculation in IDL? [message #17517 is a reply to message #17379] Mon, 18 October 1999 00:00 Go to previous messageGo to previous message
joerg.mosthaf is currently offline  joerg.mosthaf
Messages: 5
Registered: July 1999
Junior Member
J.D. Smith <jdsmith@astro.cornell.edu> wrote:
: You can of course fully sort the data and then select element p(N-1) of
: the sorted array where p is your quantile percentage and N is the number
: of elements in your array.

: However, if you're really looking for speed, you may need to consider a
: *selection* routine (not provided with IDL). The advantage of selection
: over sorting is that you don't care if everything is in order, just that
: everything less than the nth largest is to the left of it, everything
: greater is to the right, in any order. You gain as the log(N) over an
: optimized full sort. Numerical Recipes provides a nice selection
: routine, but it probably would be slower than sorting if translated to
: IDL. Compiling in C or Fortran and linking into IDL would provide the
: speed-up.

Well, I will first try the suggestion from Mr. Romashkin, and if it is lacking
in speed, then I'll look into a selection routine in C.

Thank you for the answers,

Joerg Mosthaf
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Velocity vectors on maps
Next Topic: DAY OF YEAR

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:21:15 PDT 2025

Total time taken to generate the page: 0.00435 seconds