in reply to Re^3: Calculating statistical medianin thread Calculating statistical median
It should sort the array before calculating median this way. Besides that it does not handle the array with even elements correctly.