Index exceeds the number of array elements
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, matlab shows me this problem:
Index exceeds the number of array elements (495).
Error in Untitled22222 (line 34)
if suma(i)== 0
I mean exactly this loop, I got a little lost and I don't know what to do next.
while 1
if suma(i)== 0
p_kolumna=i;
break;
end
i=i+1;
end
Thank you for your help
10 件のコメント
回答 (2 件)
KSSV
2021 年 11 月 12 日
Replace the while loop condition:
while 1
with
while i<=length(suma)
It eill not give the error..but still I am surprised what for this while loop is.
4 件のコメント
KSSV
2021 年 11 月 15 日
It is defined... But in the while loop suma will never be zero and it will never take the defined value. What is your problem exactly?
参考
カテゴリ
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!