Documentation |
Kernel smoothing function estimate
[f,xi] = ksdensity(x) returns a probability density estimate, f, for the sample in the vector x. The estimate is based on a normal kernel function, and is evaluated at 100 equally spaced points, xi, that cover the range of the data in x.
ksdensity works best with continuously distributed samples.
[f,xi] = ksdensity(x,pts) returns a probability density estimate, f, for the sample in the vector x, evaluated at the specified values in vector pts. Here, the xi and pts vectors contain identical values.
[f,xi] = ksdensity(x,pts,Name,Value) returns a probability density estimate, f, for the sample in the vector x, with additional options specified by one or more Name,Value pair arguments.
For example, you can define the function type ksdensity evaluates, such as probability density, cumulative probability, survivor function, and so on. Or you can specify the bandwidth of the smoothing window.
[1] Bowman, A. W., and A. Azzalini. Applied Smoothing Techniques for Data Analysis. New York: Oxford University Press Inc., 1997.