How to plot a histogram by hand

2 次查看(过去 30 天)
Van Phu Ha
Van Phu Ha 2018-1-17
编辑: Van Phu Ha 2018-1-17
Hi everyone, I have a question of drawing a histogram by hand. The data I have is
1) x = [0:9]
2) y = [6428901 2708498 1199394 725711 514369 188590 35629 5699 900 633]: the number of data in range of [0 1], [1 2], [3 4] ... [8 9].
I want to draw a figure like histogram because now I have had the distribution of data, the only I need to do is draw it. I have used function bar:
bar(x,y,'hist');
and I get the figure
But I want one column bar corresponding to a interval, e.g. [0 1] or [2 3] ..., and the beginning point must be 0 instead of a blank
Thank you in advance. Hope you can help me.

回答(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