How to analyze a distribution parameters?
Mostrar comentarios más antiguos
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 comentario
John D'Errico
el 2 de Abr. de 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.
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 2 de Abr. de 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 comentarios
Avigdor
el 2 de Abr. de 2016
Image Analyst
el 2 de Abr. de 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
el 2 de Abr. de 2016
Categorías
Más información sobre Spectral Estimation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!