Error while computing mean of a row vector
3 ビュー (過去 30 日間)
古いコメントを表示
I am getting the following error while finding out the mean of a row vector(using the mean function of matlab) containing ten elements:
Subscript indices must either be real positive integers or logicals.
Could any one tell me how to resolve this error?
Thank you!
0 件のコメント
採用された回答
Star Strider
2015 年 8 月 19 日
In the Command Window, type:
which mean -all
If it returns:
mean is a variable.
among its path returns, you are ‘shadowing’ (or ‘overshadowing’) the mean function with a variable you named ‘mean’. The solution is to rename the variable to ‘meanx’ or some such.
5 件のコメント
Star Strider
2015 年 8 月 20 日
I still believe you’re shadowing the mean function somewhere in your code.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!