How can I add a delay in a function of a function (DDE)?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sofia Tsangaridou
am 13 Jul. 2021
Kommentiert: Steven Lord
am 13 Jul. 2021
Hey guys,
I'm new to MATLAB and I'm having some trouble coding the model I need to code. So, I have two delayed differential equations (time delays) but the delays are implicit in my model. What I mean by that is, for exaple, my DDEs look like this:
dy/dt = y(x(t - 1)) + y(t)
instead of:
dy/dt = y(t - 1) + y(t).
I've managed to code the latter with dde23 but I can't figure out how to code the version of the DDE I actually have because I don't know how to delay t in x. With what I've tried I can only get a delay x in y (I'm assuming cause MATLAB didn't recognise x as a function of t as but I don't know how to do that either since I don't have an expression of x(t). I only have dx/dt which in turn depends on the soludion of the system of DDEs).
Any insight will be greatly appreciated. Thank you in advance.
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 13 Jul. 2021
The dde23 function is for solving delay differential equations with constant delays.
The ddesd function is for solving delay differential equations with general delays. There's also ddensd for DDEs of neutral type.
From the description of your problem I think it fits the model of ddesd rather than dde23.
5 Kommentare
Steven Lord
am 13 Jul. 2021
Your system of DDEs is
where
.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/683713/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/683718/image.png)
The dely function on that page accepts t and Q.
The delays in x will be Z(2, :) and the delays in T will be Z(5, :) in ddefun.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Delay Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!