Subscript indices must either be real positive integers or logicals.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I got this error when i found the mean of a histogram. I have used
[pixelCount grayLevels] = imhist(Im);
meanOriginal = sum(pixelCount .* grayLevels) / sum(pixelCount);
1 Kommentar
Stephen23
am 30 Jan. 2016
Have you defined a varibale named sum ?
Please tell us exactly the output of
which sum -all
Antworten (1)
Walter Roberson
am 30 Jan. 2016
You have probably named a variable sum, interfering with the use of the sum function.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Histograms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!