Categories &

Functions List

Function Reference: cdfcalc

statistics: [yCDF, xCDF, n, emsg, eid] = cdfcalc (x)

Calculate an empirical cumulative distribution function.

[yCDF, xCDF] = cdfcalc (x) calculates an empirical cumulative distribution function (CDF) of the observations in the data sample vector x. x may be a row or column vector, and represents a random sample of observations from some underlying distribution. On return xCDF is the set of x values at which the CDF increases. At XCDF(i), the function increases from YCDF(i) to YCDF(i+1).

[yCDF, xCDF, n] = cdfcalc (x) also returns n, the sample size.

[yCDF, xCDF, n, emsg, eid] = cdfcalc (x) also returns an error message and error id if x is not a vector or if it contains no values other than NaN.

See also: cdfplot

Source Code: cdfcalc