ksdensity-func
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, K is the kernel function, Origin uses normal (Gaussian) kernel function, , and is the ith element in vector vX.
Wand, M.P. and Jones, M.C. (1995). Kernel Smoothing. Chapman & Hall, London.