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!

 채택된 답변

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

질문:

2015년 9월 17일

댓글:

2015년 9월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by