Numerical integration "backwards" for ODE45

조회 수: 23 (최근 30일)
Amirah Algethami
Amirah Algethami 2022년 12월 19일
댓글: Amirah Algethami 2022년 12월 19일
Hi There;
I should apply Backword integration for system of differential equation by ODE45 solver in Matlab, it seems easy for some people, I want an example to understand how to make Backword integration. your answer appreciated.
Best
AA

채택된 답변

Torsten
Torsten 2022년 12월 19일
fun = @(t,y) y;
tspan = [0 1];
y0 = 1;
[Tf,Yf] = ode45(fun,tspan,y0);
tspan = [1 0];
y0 = exp(1);
[Tb,Yb] = ode45(fun,tspan,y0);
plot(Tf,Yf,Tb,Yb)

추가 답변 (1개)

Fabio Freschi
Fabio Freschi 2022년 12월 19일
  댓글 수: 3
Fabio Freschi
Fabio Freschi 2022년 12월 19일
@Torsten already reported an example. I still warn you to pay attention to integrate backwards because in some cases you may have numerica blowup
Amirah Algethami
Amirah Algethami 2022년 12월 19일
thanks , I hoping that not will happen with my equations.

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

카테고리

Help CenterFile Exchange에서 Marine and Underwater Vehicles에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by