Info

This question is closed. Reopen it to edit or answer.

Hi All, I used matlab Hist(x) function , x adata with single coloumn. my question is How to interpret the obtained result ? since, I have one column what should I write in X and Y axises?

1 view (last 30 days)
How to interpret Hist?

Answers (1)

Star Strider
Star Strider on 24 Oct 2014
You probably need to use hist with output arguments:
[counts,centers] = hist(x);
That will give you the ‘counts’ over a range of x values given by the ‘centers’ variable. See the documentation for hist on how to use the bar plot function to plot the result.
For example:
figure(1)
bar(centers,counts)
will do what you want.
  2 Comments
Abinet
Abinet on 24 Oct 2014
Thanks for the quick reply. One more doubt, As I mentioned x is a column, let's say "speed". Which axis is exactly represent the speed, Counts or center? Thanks again!

Tags

Community Treasure Hunt

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

Start Hunting!