While loop stop when repeat answers
이전 댓글 표시
I am currently working on a while loop to get an estimate for pi^2/6. How do I stop the while loop one it starts to produce the same answer over and over?
답변 (1개)
Walter Roberson
2019년 7월 11일
old = nan
New = nan
while old ~= New
old = New
New = whatever
end
카테고리
도움말 센터 및 File Exchange에서 Random Number Generators에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!