Repeating a loop/iteration in a for loop (for adaptive time stepping)
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I am trying to write a code for adaptive time stepping using the explicit euler method.
I was wondering if there is a way to repeat an iteration for a 'for' loop which has an if-else statement like this:
if error is greater than tolerance
Throw current results away, and decrease time step using a specific formula and redo calculations for the current iteration
Else
Accept results and calculate new increased time step, and continue with calculations for next iteration
end
Thank you for the help!
Regards
Ushnik
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 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!