How can I plot this small set as a beautiful histogram?

조회 수: 3 (최근 30일)
Geeniee
Geeniee 2021년 2월 26일
댓글: Simon Allosserie 2021년 2월 26일
I have a set of values which represent a statistic
x =
227 187 223 254 210 226 229 275 201 188 204 101 180
I am asked to present these values as a histogram. I know I am supposed to use the command histogram, but how do i make the height equal to each value and then add a name for each element?

답변 (1개)

Simon Allosserie
Simon Allosserie 2021년 2월 26일
You are not making a histogram if you want to have the height of the bars equal to the value. You are making a bar graph. This should be what you need:
https://nl.mathworks.com/help/matlab/ref/bar.html
  댓글 수: 2
Geeniee
Geeniee 2021년 2월 26일
Damn that's right, thank you!
Simon Allosserie
Simon Allosserie 2021년 2월 26일
You're welcome :) Can you vote my answer as the correct one to close this question? Thanks!

댓글을 달려면 로그인하십시오.

카테고리

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