Numerical integration "backwards" for ODE45

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

 Respuesta aceptada

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)

Más respuestas (1)

Fabio Freschi
Fabio Freschi el 19 de Dic. de 2022

1 voto

3 comentarios

Amirah Algethami
Amirah Algethami el 19 de Dic. de 2022
yes, I have looked at it before, still confused I want full example. if you could do that !. thanks for replying on me.
Regards;
AA
Fabio Freschi
Fabio Freschi el 19 de Dic. de 2022
@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 el 19 de Dic. de 2022
thanks , I hoping that not will happen with my equations.

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Preguntada:

el 19 de Dic. de 2022

Comentada:

el 19 de Dic. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by