Can someone explain this bug?
a = rand(100,1);mean(a(4), a(6))
Output:
Error using sumDimension argument must be a positive integer scalar within indexing range.Error in mean (line 117) y = sum(x, dim, flag)/size(x,dim);
bugMATLABmeansum
a = rand(100,1);mean(a(4), a(6))
Error using sumDimension argument must be a positive integer scalar within indexing range.Error in mean (line 117) y = sum(x, dim, flag)/size(x,dim);
Best Answer