What happen to this loop?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 14 de Jun. de 2022
0 votos
See the FAQ
If you want, you can use >= instead of == or use ismembertol
1 comentario
Allen Wei
el 15 de Jun. de 2022
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!