What if I need both the data and the plot of a histogram?

I have to run twice?
hist(data,number_of_bins); h1 = hist(data,number_of_bins);

 Accepted Answer

Call HISTOGRAM instead of HIST and access the properties of the histogram graphics object it returns.

2 Comments

Then call HIST to get the data and call BAR to plot it.

Sign in to comment.

More Answers (0)

Asked:

on 27 Sep 2015

Commented:

on 28 Sep 2015

Community Treasure Hunt

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

Start Hunting!