simulation of dde problem

14 views (last 30 days)
mallela ankamma rao
mallela ankamma rao on 9 Aug 2022
Good evening sir i am trying to find simulation of dde model problem but i got error. I. request you sir please help me by resolving this error
beta = 1.9;
a1 = 0.3;
a2 = 0.2;
gamma1= 0.01;
gamma2= 0.01;
gamma3= 0.05;
mu= 0.05;
tau =14;
N=1;
d1 = 0.04;
d2 = 0.02;
ddeSEIQR = @(t,y,Z)[N-beta*y(1)*y(3)/N-mu*y(1);...
(beta*y(1)*y(3)/N)-beta*exp(-mu*tau)*Z(1,1)*Z(3,1)/N-a1*y(2)-gamma1*y(2)-mu*y(2);...
beta*exp(-mu*tau)*Z(1,1)*Z(3,1)/N-a2*y(3)-gamma2*y(3)-d1*y(3)-mu*y(3);...
a1*y(2)+a2*y(3)-d2*y(4)-gamma3*y(4)-mu*y(4);...
gamma1*y(2)+gamma2*y(3)+gamma3*y(4)-mu*y(5)];
sol = dde23(ddeSEIQR,[14,1],[0.999,0,0.001,0,0],[0,200] ) ;
figure;
plot(sol.x,sol.y(1,:))
hold on
plot(sol.x,sol.y(2,:),'-')
hold on
plot(sol.x,sol.y(3,:),'--')
hold on
plot(sol.x,sol.y(4,:),'--')
hold on
plot(sol.x,sol.y(5,:),'--')
hold off
title('Equilibrium points for SEAIQR Model');
label ('time(days)');
Unrecognized function or variable 'label'.
label('solution y');
legend('S', 'E','I', 'Q','R');
ERROR:
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in
SEIQR_dde>@(t,y,Z)[N-beta*y(1)*y(3)/N,-mu*y(1);(beta*y(1)*y(3)/N)-beta*exp(-mu*tau)*Z(1,1)*Z(3,1)/N-a1*y(2)-gamma1*y(2)-mu*y(2);beta*exp(-mu*tau)*Z(1,1)*Z(3,1)/N-a2*y(3)-gamma2*y(3)-d1*y(3)-mu*y(3);a1*y(2)+a2*y(3)-d2*y(4)-gamma3*y(4)-mu*y(4);gamma1*y(2)+gamma2*y(3)+gamma3*y(4)-mu*y(5)]
(line 15)
ddeSEIQR = @(t,y,Z)[N- beta*y(1)*y(3)/N -mu*y(1);
Error in dde23 (line 228)
f0 = feval(ddefun,t0,y0,Z0,varargin{:});
Error in SEIQR_dde (line 21)
sol = dde23(ddeSEIQR,[14,1],[0.999,0,0.001,0,0],[0,200] ) ;
  4 Comments
Torsten
Torsten on 10 Aug 2022
what is [14,1] and how did i take ?
Did you read the documentation of dde23 ?
14 and 1 are the lags in your differential equations.
I wonder why you specified two lags because in your equations, you only refer to the first (14) with the terms
Z(1,1) (which means y1(t-14)) and
Z(3,1) (which means y3(t-14)).
mallela ankamma rao
mallela ankamma rao on 10 Aug 2022
Thank you very much sir Sir this is not my model code. I want to do a paper on delay differential equations.so while i am searching for code,i got this code. Sir if you dont mind,can you refer some codes on dde models

Sign in to comment.

Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!