| Curve Fitting Toolbox | ![]() |
Return descriptive statistics about the data
Syntax
Arguments
Description
xds = datastats(xdata)
returns statistics for xdata to the structure xds. The structure contains the fields shown below.
[xds,yds] = datastats(xdata,ydata)
returns statistics for xdata and ydata to the structures xds and yds, respectively. xds and yds contain the fields shown above. xdata and ydata are column vectors of the same size.
Remarks
If xdata or ydata contains complex values, only the real part of the value is used in the statistics computations. If the data contains Infs or NaNs, they are processed using the usual MATLAB rules.
Example
Return data statistics for the census data.
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 | differentiate | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |