I want to create a curve on the histogram?

26 ビュー (過去 30 日間)
reyadh Albarakat
reyadh Albarakat 2015 年 5 月 26 日
編集済み: Thorsten 2015 年 5 月 27 日
Hi Guys, first of all I am beginner in Matlab, I did histogram to the data, now I want to create curve on the histogram which I made.
Thank you
Reyadh
  1 件のコメント
Image Analyst
Image Analyst 2015 年 5 月 26 日
What do you mean? Do you mean like you have a bar chart of the counts and you'd like to superimpose a smooth line/curve plot (like a Gaussian or something) on top of the bar chart?

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

採用された回答

Thorsten
Thorsten 2015 年 5 月 26 日
編集済み: Thorsten 2015 年 5 月 26 日
If you want to plot something on top of your histogram, use
hold on
plot(your arguments here)
If you want to plot the histogram as a curve, use
H = hist(whatever);
plot(H)
  5 件のコメント
Thorsten
Thorsten 2015 年 5 月 26 日
編集済み: Thorsten 2015 年 5 月 27 日
Try
[hi cx] = hist(H);
plot(cx, hi, 'r', 'LineWidth', 10)
What are the following commands showing you?
subplot(1,2,1), hist(H)
subplot(1,2,2), plot(cx, hi)
reyadh Albarakat
reyadh Albarakat 2015 年 5 月 26 日
Thank you so much Thorsten, I appreciate you efforts.
Reyadh

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

その他の回答 (0 件)

カテゴリ

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