Elemination in for loop
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Najiya Omar
am 23 Jan. 2018
Kommentiert: Star Strider
am 24 Jan. 2018
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 Kommentare
Akzeptierte Antwort
Star Strider
am 23 Jan. 2018
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 Kommentare
Star Strider
am 24 Jan. 2018
@Najiya Omar —
If my Answer helped you solve your problem, please Accept it!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!