How to add a trendline to a histogram plot and not show the histogram?

8 ビュー (過去 30 日間)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2020 年 2 月 25 日
回答済み: darova 2020 年 2 月 25 日
I need to add a trendline to the histogram and becuase I have several datasets I want to remove the histogram and keep only trendlines.
Any idea?

回答 (1 件)

darova
darova 2020 年 2 月 25 日
Here is my solution
x = randi(100,1,100);
hist(x,20);
[y,x0] = hist(x,20);
hold on
plot(x0,y)
hold off

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by