+ 2 , " "
The average of the two numbers
at or near the center position.
End the defining program.
End the program.
Put the program on the stack.
Store the program as LMED.
Calculate the median of the list you sorted using SORT.
. IlJIDIRlIDIBJmI 8!IiIIiI IBID HIlI.
LMED is called by MEDIAN.
MEDIAN (Median of Statistics Data)
Return a vector representing the medians of the columns of the statis-,
• Arrays, lists, and stack elements. MEDIAN extracts a column of
data from 2:DAT in vector form. To convert the vector to a list,
MEDIAN puts the vector elements on the stack and then combines
them into a list. From this list the median is calculated using SORT
The median for the mth column is calculated first, and the median
for the first column is calculated last, so as each median is calcu-
lated, it is moved to the stack level above the previously calculated
28: Programming Examples