How to solve a differential equation with time delay using ode45
Mostrar comentarios más antiguos
I am trying to solve follwing differential equation:
A, B and C are constants.
I already tried to solve this equation using ode45 by replacing (
) by only t. How can I implement the time shift into the code?
) by only t. How can I implement the time shift into the code?y0 = [0];
%theta = 5;
tspan = linspace(0,100,101);
[t,y] = ode45(@(t,y) ((A* (C - y *t).^(B)) - y), tspan, y0);
The equation that I want to solve is
[t,y] = ode45(@(t,y) ((A* (C - y(t-theta) *t).^(B)) - y), tspan, y0);
Thanks
Kind regards
1 comentario
Torsten
el 9 de Abr. de 2020
Try dde23.
Respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!