MATLAB: Which methods used in the “ksdensity” function for the selection of optimal bandwidth

ksdensity/bandwidth

"ksdensity" function returns the bandwidth of the kernel smoothing window. The default bandwidth is th optimal for normal densities.
Which methods used in the ksdensity for the selection of optimal bandwidth in the default bandwidth. (ex. Normal scale rules, Cross-validation; Least squares cross-validation, Biased cross-validation, …)
Thank you.

Best Answer

If you look inside the ksdensity, you will see that it calls mvksdensity, which in turn calls the internal function apply_censoring_get_bandwidth, which calculates the bandwidth using "Scott's rule".