How to plot a histogram by hand

2 visualizaciones (últimos 30 días)
Van Phu Ha
Van Phu Ha el 17 de En. de 2018
Editada: Van Phu Ha el 17 de En. de 2018
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.

Respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by