by Maarten <maarten.sneep@[EMAIL PROTECTED]
>
Feb 14, 2008 at 01:04 AM
On Feb 13, 5:04 pm, Spon <christoph.b...@[EMAIL PROTECTED]
> wrote:
> pc5 = Data( (SORT(Data) ) (5 * N_ELEMENTS(Data) / 100) )
> pc95 = Data( (SORT(Data) ) (95 * N_ELEMENTS(Data) / 100) )
Please use
compile_opt defint32, strictarr
or
compile_opt idl2
at the beginning of each function (and in your IDL startup script) and
square braces for readability. For me at least it makes my head spin.
Consider the following instead:
pc5 = Data[ (SORT(Data))[5 * N_ELEMENTS(Data) / 100] ]
At least now it is clear which is which (array indexing vs. function
calling).
If you need both pc5 and pc95, be sure to store the sorted index:
sidx = sort(data)
ndata = n_elements(data)
pc5 = data[sixd[5*ndata / 100]]
pc66 = data[sixd[66*ndata / 100]]
Maarten