How to use not equal in for loop
117 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Is it possiable to use ~= in for loop like
for t ~= 1
xxx
xxx
xxx
end
0 comentarios
Respuestas (1)
James Tursa
el 10 de Ag. de 2020
Editada: James Tursa
el 10 de Ag. de 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 comentarios
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!