how to plot probability density plot ?
4 ビュー (過去 30 日間)
古いコメントを表示
I have two dimensional array 1*120, I want to make probability density plot in. how to I plot in matlab?
0 件のコメント
回答 (1 件)
Image Analyst
2015 年 2 月 28 日
How about calling hist() and bar() or plot()?
data = randn(1, 120)
[counts, binCenters] = hist(data, 16)
counts = counts / sum(counts); % Normalize
bar(binCenters, counts)
grid on;
2 件のコメント
ishita agrawal
2017 年 8 月 19 日
Hey, I was looking for similar solution. It solved my problem. Thanks.
Image Analyst
2017 年 8 月 19 日
You're welcome. You can vote for answers if you want to "thank" the poster with reputation points. Now, with recent releases of MATLAB, we use histcounts() or histogram() instead of hist().
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!