Imane Hachoumi
2019-05-12 22:17:13 UTC
Hi everyone,
I need help in executing a script code to get a plot with double Y-axis;
here is the code that I'm working on:
(Nb: please if you notice any error, don't hesitate to tell me, thank you)
function []=Batch()
y0 = [1; 200; 0]; // CX0, CS0,CE0;
x0=[1; 100; 0];
t0 = 0;
t = linspace(0,10,100);
function [ydot]=MyFun(t,y)
Yxs=0.038;Yes=0.436; mumax=0.45;Ks=33.78;
Kis=33.96; CEmax=83.96; n=0.89;
mu = mumax*(y(2)/(Ks+y(2)+((y(2)^ 2)/Kis)))*(1-(y(3)/CEmax)^n);
ydot = [ mu * y(1);//CX0
(mu * y(1)/Yxs);//CS0
Yes/Yxs * mu * y(1)];//CE0
endfunction
y = ode(y0,t0,t,MyFun);
plot(t,y(2,:),'kx-',t,y(1,:),'ro-');
xlabel ('time (h)');ylabel('Cs(g.L-1)');zlabel('Ce(g.L-1)left');
legend('Ce','Cs');
endfunction
I need help in executing a script code to get a plot with double Y-axis;
here is the code that I'm working on:
(Nb: please if you notice any error, don't hesitate to tell me, thank you)
function []=Batch()
y0 = [1; 200; 0]; // CX0, CS0,CE0;
x0=[1; 100; 0];
t0 = 0;
t = linspace(0,10,100);
function [ydot]=MyFun(t,y)
Yxs=0.038;Yes=0.436; mumax=0.45;Ks=33.78;
Kis=33.96; CEmax=83.96; n=0.89;
mu = mumax*(y(2)/(Ks+y(2)+((y(2)^ 2)/Kis)))*(1-(y(3)/CEmax)^n);
ydot = [ mu * y(1);//CX0
(mu * y(1)/Yxs);//CS0
Yes/Yxs * mu * y(1)];//CE0
endfunction
y = ode(y0,t0,t,MyFun);
plot(t,y(2,:),'kx-',t,y(1,:),'ro-');
xlabel ('time (h)');ylabel('Cs(g.L-1)');zlabel('Ce(g.L-1)left');
legend('Ce','Cs');
endfunction