Median

Global Algorithm - One-Dimensional Algorithm

For a set of ordered data values, the following formulas are used to compute the Median value:

m=YN+12,for odd values of N
m=YN2+YN2+12,for even values of N

where Y is the input data vector and must be ordered. In case Y is not ordered, a sorting algorithm is required. N is the length of the data vector and m represents the computed median value.

Input Parameters

Parameter Type Constraint Description Remarks
Y YRN NN Input data vector of length N  

Output Parameters

Parameter Type Constraint Description Remarks
m mR   Median value of Y The result is sensitive to improper values such as ‘nan’, ‘inf’, ‘null’, etc.

Tool Support

Single Steps using the Algorithm