ODE solver not running full time span

I have never encountered this issue before but I am solving a large system with ode15s and have specified a tspan of 0:0.01:360 but the solver is only outputting solutions up to t=321.6. I'm assuming there is a numerical issue but the solver is not outputting any error. Has anyone else experienced this and found a fix?

답변 (1개)

Steven Lord
Steven Lord 2023년 1월 23일
편집: Steven Lord 2023년 1월 23일

0 개 추천

That suggests to me that you should have received a warning but perhaps you've suppressed it? Something along the lines of "Failure at t=321.6. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (some_small_number) at time t."
Did you turn warning off in your code or turn off specifically the warning with identifier MATLAB:ode15s:IntegrationTolNotMet?
[Fixed warning identifier to refer to ode15s not ode45.]

댓글 수: 3

Torsten
Torsten 2023년 1월 23일
Or you might have defined an event and the code stopped at the time when this event happened ?
Steven Lord
Steven Lord 2023년 1월 23일
That's another possibility, yes.
Quintessa Hay
Quintessa Hay 2023년 1월 23일
That was it, the warning was turned off. I don't recall doing this however and didn't even know you could do that. I was working off code by another author edited for my model so it must have been turned off somewhere in there or one of the other codes I was using I suppose. Thanks for the help!

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

카테고리

제품

릴리스

R2022a

질문:

2023년 1월 23일

댓글:

2023년 1월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by