How to Extract Delayed State Terms in a Model with Distributed Delay?
I’m working on a model with distributed delays, and I’m using the ddesd function to solve the delay differential equations. My setup involves a distributed delay, defined by:
tau = 1;
gamma = 0.5;
number_of_delays = 11; % should be odd
lags = linspace(tau-gamma,tau+gamma,number_of_delays);
tspan=[0 600];
sol=ddesd(@(t,y,Z)ddefunc(t,y,Z,lags),lags,[0.2; 0.08],tspan);
p=plot(sol.x,sol.y);
set(p,{‘LineWidth’},{2;2})
title(‘y(t)’)
xlabel(‘Time(days)’), ylabel(‘populations’)
legend(‘x’,’y’)
function yp = ddefunc(~,y,Z,lags)
a=0.1;
b=0.05;
c=0.08;
d=0.02;
yl1 = trapz(lags,Z(2,:));
yp = [a*y(1)-b*y(1)*yl1;
c*y(1)*y(2)-d*y(2)];
end
In the case of discrete delays, we can easily extract the delayed state terms using the deval or interp1 commands. However, I’m unsure how to proceed with extracting or examining the delayed state terms for distributed delay case.I’m working on a model with distributed delays, and I’m using the ddesd function to solve the delay differential equations. My setup involves a distributed delay, defined by:
tau = 1;
gamma = 0.5;
number_of_delays = 11; % should be odd
lags = linspace(tau-gamma,tau+gamma,number_of_delays);
tspan=[0 600];
sol=ddesd(@(t,y,Z)ddefunc(t,y,Z,lags),lags,[0.2; 0.08],tspan);
p=plot(sol.x,sol.y);
set(p,{‘LineWidth’},{2;2})
title(‘y(t)’)
xlabel(‘Time(days)’), ylabel(‘populations’)
legend(‘x’,’y’)
function yp = ddefunc(~,y,Z,lags)
a=0.1;
b=0.05;
c=0.08;
d=0.02;
yl1 = trapz(lags,Z(2,:));
yp = [a*y(1)-b*y(1)*yl1;
c*y(1)*y(2)-d*y(2)];
end
In the case of discrete delays, we can easily extract the delayed state terms using the deval or interp1 commands. However, I’m unsure how to proceed with extracting or examining the delayed state terms for distributed delay case. I’m working on a model with distributed delays, and I’m using the ddesd function to solve the delay differential equations. My setup involves a distributed delay, defined by:
tau = 1;
gamma = 0.5;
number_of_delays = 11; % should be odd
lags = linspace(tau-gamma,tau+gamma,number_of_delays);
tspan=[0 600];
sol=ddesd(@(t,y,Z)ddefunc(t,y,Z,lags),lags,[0.2; 0.08],tspan);
p=plot(sol.x,sol.y);
set(p,{‘LineWidth’},{2;2})
title(‘y(t)’)
xlabel(‘Time(days)’), ylabel(‘populations’)
legend(‘x’,’y’)
function yp = ddefunc(~,y,Z,lags)
a=0.1;
b=0.05;
c=0.08;
d=0.02;
yl1 = trapz(lags,Z(2,:));
yp = [a*y(1)-b*y(1)*yl1;
c*y(1)*y(2)-d*y(2)];
end
In the case of discrete delays, we can easily extract the delayed state terms using the deval or interp1 commands. However, I’m unsure how to proceed with extracting or examining the delayed state terms for distributed delay case. distributed delay, ddesd, delay differential equation, delayed state MATLAB Answers — New Questions