- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine derives
the unweighted median of an array. If there are an even number of elements, the median is computed
from the mean of the two elements that straddle the median.
Invocation
CALL KPG1_MEDUx( BAD,
EL, ARRAY, MEDIAN, NELUSE, STATUS )
Arguments
BAD = LOGICAL (Given)
If BAD is .TRUE.
there may be bad pixels present in the vector and so should be tested. If BAD is .FALSE. there is no
testing for bad values.
EL = INTEGER (Given)
The number of elements within the array to sort.
ARRAY( EL ) = ? (Given and Returned)
The array whose median is to be found. On exit the
array is partially sorted.
MEDIAN = ? (Returned)
The median of the array.
NELUSE
= INTEGER (Returned)
The number of elements actually used after bad values have
been excluded.
STATUS = INTEGER (Given and Returned)
The global status.
Notes:
-
There is a routine for each numeric data type: replace "
x"
in the routine name by D, R, I, W, UW, B or
UB as appropriate. The array and MEDIAN arguments supplied to the routine must have the data
type specified.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑