Histogram - relative frequency

4 views (last 30 days)
Saskia Davis
Saskia Davis on 21 Feb 2018
Hi all,
So,
I’m making a histogram
It is of the length of some particles ("particles") vs frequency
Particle length is in the wrong units so I have to multiply the value by 9.77
Anything less than 2 is noise
I want to keep a constant scale (so I can compare samples)
So far I have:
lc = cellfun(@(c) c(end,6),particles);
lcum = (lc*9.77);
goodIndexes = (lcum) >= 2;
histogram(lcum(goodIndexes), 0:25:1000);
I need to change the y values (frequency)(so they are relative to the number of particles)
If, for example, I have 3957 particles, how would I go about dividing the y values by this number?

Answers (0)

Community Treasure Hunt

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

Start Hunting!