필터 지우기
필터 지우기

ODE with variable time vector

조회 수: 1 (최근 30일)
Simon
Simon 2015년 10월 7일
답변: Star Strider 2015년 10월 7일
Hello, t is my time vector which is defined as
t = tstart:dt:tend;
The ODE is solved this way:
ode15s(@ode, t, ...)
At a known time, the gradient dxdt gets in a very short time to a very high value.
To solve this, dt must be very small. The rest of ODE could be solved with a dt which is several times higher.
Can I give a time vector with a variable scale? Or have I to define three seperate ode solver with the required time vector?

답변 (1개)

Star Strider
Star Strider 2015년 10월 7일
Your time vector can be whatever you want it to be (providing it has at least three elements), but those will be the times the ODE solver outputs the results of the integration. The solver will evaluate your ODE with adaptive time intervals just as it normally would.
If you have discontinuities in your ODE function, you can usually see them by plotting the ODE function first, and defining your time vector to avoid them.

카테고리

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