Azzera filtri
Azzera filtri

I want to create a curve on the histogram?

21 visualizzazioni (ultimi 30 giorni)
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
  1 Commento
Image Analyst
Image Analyst il 26 Mag 2015
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?

Accedi per commentare.

Risposta accettata

Thorsten il 26 Mag 2015
Modificato: Thorsten il 26 Mag 2015
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);
  5 Commenti
Thorsten il 26 Mag 2015
Modificato: Thorsten il 27 Mag 2015
[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 il 26 Mag 2015
Thank you so much Thorsten, I appreciate you efforts.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by