How to get a kernel density plot

23 ビュー (過去 30 日間)
Sana Ejaz
Sana Ejaz 2019 年 4 月 3 日
コメント済み: Sana Ejaz 2019 年 4 月 12 日
I need to plot a kernel density for attached data but I dont know how to do it.Read some material online and watched tutorials on youtube but coudn't wrapped my head arround the plot.
Would highly appreciate if someone can help me with that.
I am attaching my data.
  3 件のコメント
Sana Ejaz
Sana Ejaz 2019 年 4 月 3 日
Hi,
It is similar to the normal distribution curve.I have attached an example.
I think normall distribution curve is also one of the kinds of kernel density function but am not sure about that.
Agnish Dutta
Agnish Dutta 2019 年 4 月 11 日
I found a script for estimating Kernal density on MATLAB file exchange:
It should be able to work on your data, so give it a try.

サインインしてコメントする。

採用された回答

David Wilson
David Wilson 2019 年 4 月 11 日
You also can use ksdensity from the Stats toolbox. But you have supplied us with a matrix with 25 columns! Which column were you intersted in? (Presumably you are in 1D).
load ChangeinBeta
A = ChangeInBeta;
ksdensity(A(:,1)) % just do 1st column
  1 件のコメント
Sana Ejaz
Sana Ejaz 2019 年 4 月 12 日
Thank you.
That works

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by