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!