필터 지우기
필터 지우기

How to force the ode solver to stop when a periodic solution is reached?

조회 수: 2 (최근 30일)
Rose
Rose 2014년 7월 10일
댓글: Rose 2014년 7월 10일
Hello,
I am solving a system of 4 non linear ODEs with periodic coefficients of period one year. I want the ode solver to check each year if the solution is the same as the solution of the previous year then it should stop. Otherwise it should run until the finaltime (some fixed number) is reached. So, basically there are two stopping criterion: one is periodicity and the other is finaltime. No idea how to implement this idea.
Although, what i am doing right now is: I am solving the system untill the finaltime is reached and then check the periodicity condition for the last 3 or 4 years (say).
Any kind of suggestion would be helpful.
Thanks.
  댓글 수: 4
Sara
Sara 2014년 7월 10일
Alternative: why don't you run the ode solver one year at a time in a while loop? If periodicity or finaltime are reached, you exit the loop.
Rose
Rose 2014년 7월 10일
yes, that could be a good option. I will try that and will let you know how it goes. Thanks for sparing your valuable time!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by