MACDONALD DISTRIBUTED DELAY MODEL
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Numerical Integration and Differential Equations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!