Elemination in for loop
8 ビュー (過去 30 日間)
古いコメントを表示
I have Loop from 0.1:0.1:0.1 and I want to skip some cases in this loop like 0.3, 0.7 0.9
0 件のコメント
採用された回答
Star Strider
2018 年 1 月 23 日
Try this:
v = 0.1:0.1:1;
exclude = [0.3, 0.7, 0.9];
[L1,L2] = ismembertol(v, exclude, 0.01);
new_v = v(~L1)
4 件のコメント
Star Strider
2018 年 1 月 24 日
@Najiya Omar —
If my Answer helped you solve your problem, please Accept it!
その他の回答 (0 件)
参考
カテゴリ
Help Center および 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!