Azzera filtri
Azzera filtri

Subscript indices must either be real positive integers or logicals.

2 visualizzazioni (ultimi 30 giorni)
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);

Risposte (1)

Walter Roberson
Walter Roberson il 30 Gen 2016
You have probably named a variable sum, interfering with the use of the sum function.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by