Repeating a loop/iteration in a for loop (for adaptive time stepping)

조회 수: 1 (최근 30일)
Ushnik Mukherjee
Ushnik Mukherjee 2014년 3월 19일
편집: Ushnik Mukherjee 2014년 3월 19일
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개)

카테고리

Help CenterFile 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!

Translated by