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!

 Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by