How to analyze a distribution parameters?
Afficher commentaires plus anciens
Hi,
I have a distribution of pixels (y) as a function of a parameter (x) where every y value (bin) is the total number of pixels at a given value of x. I'd like to analyze this distribution for mean, median, max, std, etc, and find the corresponding x values for these measurements. Anybody have a way to do this?
Thanks,
Avi
1 commentaire
John D'Errico
le 2 Avr 2016
Please don't indent your paragraphs. That causes the entire paragraph to come out as one long line, which must be scrolled to read it. I removed the indentation for you.
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 2 Avr 2016
You can simply do
meany = mean2(y);
mediany = median(y(:));
maxy = max(y(:));
stdDevy = std(y(:));
I don't see how x is involved. Your parameter "x" is basically the gray level and is not involved at all. If you want the range of "x", you can simply do
grayLevelRange = max(y(:)) - min(y(:)) + 1;
3 commentaires
Avigdor
le 2 Avr 2016
Image Analyst
le 2 Avr 2016
For some arbitrary histogram with bin heights all over the place, no bin will likely have the mean bin count. For example, let's say the bins had counts from 0 to 100,000. And let's say the mean bin height was 23,489.12343. Well, no bin has that since counts must be an integer. So let's say you round to 23,489. Well, there might be 5 or 10 or any number of bins with a count of 23,489. So which one(s) do you want? And why?
Avigdor
le 2 Avr 2016
Catégories
En savoir plus sur Piecewise Linear Distribution dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!