1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
function ypoint = ab(t,y)
global mumax1 mumax2 ks1 ks2 ki2 k1 k2 k3 k4
ypoint(1) = (mumax1*y(3)*y(1)/(y(3)+ ks1));
ypoint(3) = -k1*(mumax1*y(3)*y(1)/(y(3)+ks1));
ypoint(2) = (mumax2*y(4)*y(2)/(y(4)+ks2+(y(4)^2/ki2)))
ypoint(4) = k2*(mummax1*y(3)*y(1)/(y(3)+ks1))-k3*(mumax2*y(4)*y(2)/(y(4)+ks2+(y(4)^2/ki2)));
ypoint(5) = k4*(mumax2*y(4)*Y(2)/(y(4)+ks2+(y(4)^2/ki2)));
ypoint = ypoint(:);
end
global mumax1 mumax2 ks1 ks2 ki2 k1 k2 k3 k4 q
mumax1=0.4; mumax2= 0.4; ks1= 35; ks2=4; ki2= 170; k1= 50; k2= 50; k3= 15 k4= 75;% paramètres
tfinal= 100; % temps final
y01= 0.4; y02= 0.01; y03= 10; y04= 2; y05= 0;% conditions initiales
[t,y]= ode45('ab',[0 tfinal],[y01 y02 y03 y04 y05])% résolution
y1 = y(:,1);%extractions de Y1 Y2 Y3 Y4 et y5
y2 = y(:,2);
y3 = y(:,3);
y4 = y(:,4);
y5 = y(:,5);
q = k4*(mummax2*y4*y2/(y4+ks2+(y4^2/ki2)));
plot(t,y1,'r') % y1 fonction de temps
plot(t,y2,'g') % y2 fonction de temps
plot(t,y3,'o') % y3 fonction de temps
plot(t,y4,'a') % y4 fonction de temps
plot(t,y1,t,y2,t,y3,t,y4)% y4 fonvtion de temps
plot(t,y5)% y4 fonvtion de temps
plot(t,q,'z');
plot(t,y5,'r',t,q,'p'); |
Partager