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

조회 수: 2 (최근 30일)
Ahmad Sheikh
Ahmad Sheikh 2015년 4월 17일
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=zeros(2,1);
v(1) = x(1) + x(2);
v(2) = 0.7* x(1) + x(2);
Initial_Time=10;
Final_Time=5000;
[x1,x2] = meshgrid(-2:0.1:2);
[t,x] = ode45(@v, [Initial_Time Final_Time], [0.01624 0.1535]);
plot(x(:,1),x(:,2))
this code is without adding time delay... will someone help how to add time delay in this....?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by