Can you determine the number of times a while() statement has run before it finally ends?

I am creating a while function and need to determine the number of cycles it went through before finally coming to completion. Thanks for your help!

 Respuesta aceptada

%num is number of times u execute loop
num =0;
while your condition
num = num+1;
end

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 17 de Sept. de 2015

Comentada:

el 17 de Sept. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by