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!