How to Keep Nested For Loop Indexes From Equaling Each Other
古いコメントを表示
If I have two nested for loops like this, is there a way to skip the iteration where i=j?
for i=1:50
for j=1:50
code
end
end
採用された回答
その他の回答 (2 件)
per isakson
2020 年 5 月 5 日
for ii=1:50
for jj=1:50
if not(jj==ii)
code
end
end
end
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!