Bug with mean() on floating point vector elements
Ältere Kommentare anzeigen
Can someone explain this bug?
a = rand(100,1);
mean(a(4), a(6))
Output:
Error using sum
Dimension argument must be a positive integer scalar within indexing range.
Error in mean (line 117)
y = sum(x, dim, flag)/size(x,dim);
1 Kommentar
Stephen23
am 13 Dez. 2017
"Can someone explain this bug?"
What bug? The fact that you are using mean in a way that is not supported by MATLAB just means that you need to read the documentation.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical 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!