What happen to this loop?
Afficher commentaires plus anciens
a=0
t=1
while t==1
a=a+0.01
if a == 0.5
t=0
end
end
%why it only break loop when a=a+0.1
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 14 Juin 2022
0 votes
See the FAQ
If you want, you can use >= instead of == or use ismembertol
1 commentaire
Allen Wei
le 15 Juin 2022
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!