Curve Fitting Toolbox    
datastats

Return descriptive statistics about the data

Syntax

Arguments

xdata
A column vector of predictor data.
ydata
A column vector of response data.
xds
A structure containing descriptive statistics for xdata.
yds
A structure containing descriptive statistics for ydata.

Description

xds = datastats(xdata) returns statistics for xdata to the structure xds. The structure contains the fields shown 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 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.


  confint differentiate