Note: This page has been translated by MathWorks. Please click here

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Median value of input

**Library:**DSP System Toolbox / Statistics

The Median block computes the median of each
row or column of the input, or along vectors of a specified dimension
of the input. It can also compute the median of the entire input.
You can specify the dimension using the **Find the median
value over** parameter. While computing the median, the block
first sorts the input values. If the number of values is odd, the
median is the middle value. If the number of values is even, the median
is the average of the two middle values. To sort the data, you can
specify the **Sort algorithm** parameter as either ```
Quick
sort
```

or `Insertion sort`

. The
block sorts complex inputs according to their magnitude.

Was this topic helpful?