How to plot histogram from two vectors

5 次查看(过去 30 天)
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]

采纳的回答

Wayne King
Wayne King 2013-10-9
You want to use bar()
x = 1:5;
y = [5 3 2 6 1];
bar(x,y)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by