Looping until threshold is met
이전 댓글 표시
채택된 답변
추가 답변 (1개)
KALYAN ACHARJYA
2021년 1월 20일
0 개 추천
You have to initialize "error" before the loop. The initial value must be less than a threshold value as defined. Also make sure that the error value is continuously increasing as the iteration progress, so that it definitely break loop condition.
댓글 수: 2
AD
2021년 1월 20일
KALYAN ACHARJYA
2021년 1월 20일
Just make sure it will, otherwise, while loop runs continuously. You may check the code with sample 2/3 iteration manually.
error=abs(av_temp_simp13(iter)-av_temp_matlab);
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!