How to plot a histogram by hand
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!