| Statistics Toolbox | Search  Help Desk |
| range | Examples See Also |
Syntax
y = range(X)
Description
range(X) returns the difference between the maximum and the minimum of a sample. For vectors, range(x) is the range of the elements. For matrices, range(X) is a row vector containing the range of each column of X. The range is an easily calculated estimate of the spread of a sample. Outliers have an undue influence on this statistic, which makes it an unreliable estimator.Example
The range of a large sample of standard normal random numbers is approximately six. This is the motivation for the process capability indices Cp and Cpk in statistical quality control applications.rv = normrnd(0,1,1000,5);
near6 = range(rv)
near6 =
6.1451 6.4986 6.2909 5.8894 7.0002
See Also
std,iqr,mad