How to analyze a distribution parameters?
Ältere Kommentare anzeigen
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 Kommentar
John D'Errico
am 2 Apr. 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.
Akzeptierte Antwort
Weitere Antworten (1)
Image Analyst
am 2 Apr. 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 Kommentare
Avigdor
am 2 Apr. 2016
Image Analyst
am 2 Apr. 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
am 2 Apr. 2016
Kategorien
Mehr zu Spectral Estimation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!