Why it shows that index exceeds the number of array elements???
1 次查看(过去 30 天)
显示 更早的评论
%Statistics
areas = [5176 5183 5165]
area_mean= mean(areas)
area_var= var(areas)
area_std= std(areas)
0 个评论
回答(1 个)
Cris LaPierre
2021-3-4
You must have a variable defined as either mean, var, or std. Clear your workspace and try again.
areas = [5176 5183 5165];
area_mean= mean(areas)
area_var= var(areas)
area_std= std(areas)
% Now to recreate the error by replacing the function 'mean' with a variable
mean = 5
area_mean= mean(areas)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!