Reputation: 1239
I'm a little bit stuck on how to plot a histogram in MatLab, and typing help hist
in MatLab does not make me any wiser. So I would appreciate any help!
Basically my problem is very simple. I have a vector, V
, with five values, where each value represent the volume of a certain layer of the Earth. I simply want to create a histogram of these data, where the x-axis in my histogram should say "Inner Core", "Outer Core", etc., while the y-axis will display the volume. I've tried using the hist-command in various ways, but I can't get this to work. For instance, if I just type hist(V)
, the volume-values actually show up on the x-axis, and not the y-axis.
If anyone can help me how to make this simple histogram I will be very grateful! According to the instructions on my homework, I have to use the hist-command.
Upvotes: 0
Views: 1220