MACDONALD DISTRIBUTED DELAY MODEL

조회 수: 5 (최근 30일)
Chukwuma Ugoala
Chukwuma Ugoala 2019년 10월 17일
편집: Chukwuma Ugoala 2019년 10월 23일
Can any one help me with the plot of the system below. The code I have is taking forever to plot.
Here are the scripts for the above system
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function M = macdistime(t,x)
global a b c mu m r alp
dxdt = a*b*m*x(2)*(1-x(1))-r*x(1);
dydt = a*c*x(4)-mu*x(2);
dzdt = a*c*x(1)*(1-x(2)-x(3))-a*c*x(4)-mu*x(3);
dgdt = alp*x(1)*(1-x(2)-x(3))- (alp+mu)*x(4);
M = [dxdt;dydt;dzdt;dgdt];
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
mac_parameters.m
global a b c mu m r alp
a = 0.25; %Man biting rate
b = 0.09; %Proportion of bites that produce infection in human
c = 0.47; %Proportion of bites by which one suceptible mosquito becomes infected.
mu = 0.12; %Per capita rate of mosquito mortality
m = 40.0; %Ratio of number of female mosquitoes to that of humans
r = 0.0035;%Average recovery rate of human
alp = 10; % latency period of mosquitoes set to 10 days
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
run mac_parameters.m
for reps = 1:10;
xstart = [0:0:0:0]; % sets each of our
%initial variable values to a number between 0 and 100 and
[t,x]=ode45(@macdist,0:1:200,xstart); % integrate the system
%forward in time 200 days, with interval of 1 day
for j=1:4;
s(j) = subplot(3,3,j); plot(t,x(:,j)); xlabel('Time(days)'); ylabel('Number of infected humans');
hold on
end
title(s(1), 'x'); title(s(2), 'y'); title(s(3), 'z'); title(s(4), 'g')
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by