How to plot Histogram for a set of data in already associated with counts?
4 views (last 30 days)
Show older comments
I have a set of data in which certain values shall be counted as full cycle and certain as half cycle. eg. Values=[ 100 100 101 102 100 102 101 101] and no. of cycles=[0.5 1 1 1 0.5 0.5 1 0.5]
here I want to plot a histogram of the values depending on how many no. of cycles each occur.
Is there any easy command to consider this in matlab.
Thanks in advance, Atmaram
0 Comments
Answers (1)
Steven Lord
on 9 Nov 2017
Do you want a bivariate histogram plot (X axis represents Values, Y axis represents number of cycles, Z axis represents how often a particular Value-Cycles combination occurs?) If so use the histogram2 function.
If that's not what you want, you might want to look at the histogram function with the 'BinCounts' and 'BinEdges' parameters instead.
0 Comments
See Also
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!