Note: This page has been translated by MathWorks. Click here to see

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

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

Interquartile range

`r = iqr(x)`

`r = iqr(x,'all')`

`r = iqr(x,dim)`

`r = iqr(x,vecdim)`

`r = iqr(pd)`

returns the interquartile range of the values in `r`

= iqr(`x`

)`x`

.

If

`x`

is a vector, then`r`

is the difference between the 75th and the 25th percentiles of the data contained in`x`

.If

`x`

is a matrix, then`r`

is a row vector containing the difference between the 75th and the 25th percentiles of the sample data in each column of`x`

.If

`x`

is a multidimensional array, then`iqr`

operates along the first nonsingleton dimension of`x`

. The size of this dimension becomes 1 while the sizes of all other dimensions remain the same.