range
Range of values
Description
returns the difference between the maximum and minimum values of sample data in
y
= range(X
)X
.
If
X
is a vector, thenrange(X)
is the range of the values inX
.If
X
is a matrix, thenrange(X)
is a row vector containing the range of each column inX
.If
X
is a multidimensional array, thenrange
operates along the first nonsingleton dimension ofX
, treating the values as vectors. The size of this dimension becomes 1 while the sizes of all other dimensions remain the same. IfX
is an empty array with first dimension 0, thenrange(X)
returns an empty array with the same size asX
.
Examples
Input Arguments
Output Arguments
Tips
range
treatsNaN
s as missing values and ignores them.range
provides an easily calculated estimate of the spread of a sample. Avoid usingrange
with data that has outliers because they have an undue influence on this statistic.
Extended Capabilities
Version History
Introduced before R2006a