| Curve Fitting Toolbox™ | ![]() |
xds = datastats(xdata)
[xds,yds] = datastats(xdata,ydata)
xds = datastats(xdata) returns statistics for the column vector xdata to the structure xds. Fields in xds are listed in the table below.
Field | Description |
|---|---|
num | The number of data values |
max | The maximum data value |
min | The minimum data value |
mean | The mean value of the data |
median | The median value of the data |
range | The range of the data |
std | The standard deviation of the data |
[xds,yds] = datastats(xdata,ydata) returns statistics for the column vectors xdata and ydata to the structures xds and yds, respectively. xds and yds contain the fields listed in the table above. xdata and ydata must be of the same size.
If xdata or ydata contains complex values, only the real parts are used in computing the statistics. Data containing Inf or NaN are processed using the usual MATLAB® rules.
Compute statistics for the census data in census.mat:
load census
[xds,yds] = datastats(cdate,pop)
xds =
num: 21
max: 1990
min: 1790
mean: 1890
median: 1890
range: 200
std: 62.048
yds =
num: 21
max: 248.7
min: 3.9
mean: 85.729
median: 62.9
range: 244.8
std: 78.601![]() | confint | dependnames | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |