Median VI

Owning Palette: Probability & Statistics VIs

Requires: Base Development System

Finds the median value of the input sequence X by sorting the values of X and averaging the middle element(s) of the sorted array.

Details  Example

 Add to the block diagram  Find on the palette
X is the input sequence. If X is empty, median is NaN.
median is the calculated median value of the input sequence X.
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster.

Median Details

The Median VI finds median using the following identity.

where n is the number of elements in the input sequence X, s is the sorted sequence of X, , and .

Example

Refer to the Statistics Solver VI in the labview\examples\Mathematics\Probability and Statistics directory for an example of using the Median VI.

 Open example  Find related examples