How to use not equal in for loop
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Is it possiable to use ~= in for loop like
for t ~= 1
xxx
xxx
xxx
end
0 commentaires
Réponses (1)
James Tursa
le 10 Août 2020
Modifié(e) : James Tursa
le 10 Août 2020
You could use a while loop. E.g.,
t = 0;
while( t ~= 1 )
% code
% at some point, either set t=1 or break out of loop
end
0 commentaires
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!