How can I add a delay in a function of a function (DDE)?

5 次查看(过去 30 天)
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.

采纳的回答

Steven Lord
Steven Lord 2021-7-13
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 个评论
Sofia Tsangaridou
Sofia Tsangaridou 2021-7-13
Hey, so I've seen this example before and I have given it another look just now but I still have the same issue that I don't know how to resolve. If you look at dy/dt above you'll see that yes, y has state-dependent delays because of x but T is also delayed and that delay is a constant time delay (t = time in my model). That is the part I don't know how to tackle and I think ddesd doesn't take into account the delay in T.
Do you know of anything that could help with that? Or did I misunderstand what ddesd does?
Steven Lord
Steven Lord 2021-7-13
Your system of DDEs is where .
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Delay Differential Equations 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by