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

6 views (last 30 days)
Geeniee on 26 Feb 2021
Commented: Simon Allosserie on 26 Feb 2021
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?
0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

Answers (1)

Simon Allosserie on 26 Feb 2021
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 CommentsShow NoneHide None
Geeniee on 26 Feb 2021
Damn that's right, thank you!
Simon Allosserie on 26 Feb 2021
You're welcome :) Can you vote my answer as the correct one to close this question? Thanks!

Sign in to comment.

Categories

Find more on Histograms in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!