Range of values
returns the difference between the maximum and minimum values of sample data in
y
= range(X
)X
.
If X
is a vector, then
range(X)
is the range of the values in
X
.
If X
is a matrix, then
range(X)
is a row vector containing the range of
each column in X
.
If X
is a multidimensional array, then
range
operates along the first nonsingleton
dimension of X
, treating the values as vectors. The
size of this dimension becomes 1 while the sizes of all other dimensions
remain the same. If X
is an empty array with first
dimension 0, then range(X)
returns an empty array
with the same size as X
.
range
treats NaN
s as missing values
and ignores them.
range
provides an easily calculated estimate of the
spread of a sample. Avoid using range
with data that has
outliers because they have an undue influence on this statistic.