Elemination in for loop
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Najiya Omar
il 23 Gen 2018
Commentato: Star Strider
il 24 Gen 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 Commenti
Risposta accettata
Star Strider
il 23 Gen 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 Commenti
Star Strider
il 24 Gen 2018
@Najiya Omar —
If my Answer helped you solve your problem, please Accept it!
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!