'width' parameter in kdensity function

Can somebody plase explain me how to use the 'width' paramater of the kdensity function

 Akzeptierte Antwort

the cyclist
the cyclist am 1 Okt. 2011

0 Stimmen

I suggest you read the "Bandwidth selection" section of this Wikipedia page: http://en.wikipedia.org/wiki/Kernel_density_estimation.
The width parameter is that bandwidth, and can be adjusted accordingly.
You can see the required syntax in "doc ksdensity".

3 Kommentare

Devinya Herath
Devinya Herath am 5 Okt. 2011
Thanks.
Devinya Herath
Devinya Herath am 5 Okt. 2011
Is there a direct method to find the value(s) of x corresponding to the peak(s) of the kernel density plot?
the cyclist
the cyclist am 5 Okt. 2011
Call
[f,xi] = ksdensity(x);
then
[max_f index_to_max] = max(f);
finds the maxima and
xi(index_to_max)
gives the xi coordinates of the maxima.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by