Clear Filters
Clear Filters

How to plot this (time delayed) system in matlab?

3 views (last 30 days)
I have a time delayed state space model like this...!
dx1/dt = x1(t) + x2(t) + x1(t-d(t)) +x2(t--d(t))
dx2/dt = 0.7*x1(t) + x2(t) + x1(t-d(t)) +0.5*x2(t--d(t))
where x(t-d(t)) is the delayed state.... and our delay is time variant given by d(t) = 3+2*cos(t)...
i know about dde23 but it's for time invariant delays...
i wrote a code like this....
function v=f(t,x)
v(1) = x(1) + x(2);
v(2) = 0.7* x(1) + x(2);
[x1,x2] = meshgrid(-2:0.1:2);
[t,x] = ode45(@v, [Initial_Time Final_Time], [0.01624 0.1535]);
this code is without adding time delay... will someone help how to add time delay in this....?

Answers (0)

Community Treasure Hunt

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

Start Hunting!