Effacer les filtres
Effacer les filtres

How to plot histogram from two vectors

5 vues (au cours des 30 derniers jours)
Martin Park
Martin Park le 9 Oct 2013
Can someone help me how can I plot a histogram when I have two vectors where one vector is the x values say x=[1 2 3 4 5] and y is the count of each x y=[5 3 2 6 1]

Réponse acceptée

Wayne King
Wayne King le 9 Oct 2013
You want to use bar()
x = 1:5;
y = [5 3 2 6 1];
bar(x,y)
  1 commentaire
Daniela Rodríguez Castro
Daniela Rodríguez Castro le 19 Fév 2020
how can I do the same but with the histogram function?

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by