For Loop Which Skips Numbers Based on Row Vector
古いコメントを表示
I've got a row vector containing hunderds of random, ascending numbers. I need to run a for loop which skips these specific numbers. How do I write the counter?
採用された回答
その他の回答 (1 件)
Torsten
2020 年 3 月 26 日
0 投票
Use "setdiff" to remove the row vector elements from the range of the for-loop and name the vector v.
Then simply type
for v
...
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!