plotting a periodic system of nonlinear differential equations
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am ty to plot the solution of a system of differential equation that contains two periodic functions. I expect the plot to be periodic but is showing different plot that is the same when it is not periodic system.
These are my codes of the plot.
Thank you
function dS = lassaDFG(t, x)
xdot = zeros(7,1);
LambdH=10000;K=2000;beta1=0.221;beta4=0.052;beta3=0.206;beta2=0.0296;beta5=0.0637;omega=0.00578;d1=0.003;
muH=0.00005;muR=0.003;sigma=0.528;deltaH=0.485;gamma=0.024;alpha1=0.04;alpha2=0.03;LambdR=0.172;muV=0.05;a=1;
b=0.1;gamma1=0.31;p=365.5;
N=x(1)+x(2)+x(3)+x(4); M=x(5)+x(6);K1=K*(1-gamma1*sin((2*pi*(t+b)/p)));LambdR1=LambdR*(a+cos((2*pi*(t+b)/p)));
xdot(1)=LambdH + omega*x(4)-(beta1*x(3)+beta2*x(6))*x(1)/N -beta3*x(7)*x(1)- muH*x(1);
xdot(2)= x(1)*(beta1*x(3)+beta2*x(6))/N + beta3*x(7)*x(1)- sigma*x(2)-muH*x(2);
xdot(3)=sigma*x(2)-(muH+deltaH+gamma)*x(3);
xdot(4)=gamma*x(3)-(omega+muH)*x(4);
xdot(5)=LambdR1*(1-M/K1)*M -beta4*x(5)*x(6)/M - beta5*x(5)*x(7)- (d1+muR)*x(5);
xdot(6)=beta4*x(5)*x(6)/M+ beta5*x(5)*x(7)-(muR+d1)*x(6);
xdot(7)=alpha1*x(6)+alpha2*x(3)- muV*x(7);
dS = xdot;
[t,v] = ode45 (@lassaDFG,[0 100],[2000 40 49 20 5000 100 150]);
plot (t,v (:,3),'b','LineWidth',1.5);
xlabel ('Time (Days)'); ylabel ('Miracidia') ;
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!