# Ksdensity

ksdensity-func

## Definition:

**y=ksdensity(x, vX, w)** returns the kernel density at *x* for a given vector vX with a bandwidth *w*, where an optimal *w* can be determined by the estimation function kernelwidth.

where *n* is the size of vector vX, is the ith element in vector vX.

## Parameters:

- (input, double)
- The value to be evaluated for density
- (input, vector)
- Distributed samples used as kernel centers
- (input, double)
- Bandwidth used as kernel scale,
- (output, double)
- Kernel density