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!

 Réponse acceptée

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

Plus de réponses (0)

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!

Translated by