T=300; %Temperature (K) Kc=1.08; %Equilibrium Constant k=9*10^(-5); %Specific Reaction Rate (dm^3/mol*s) V=200; %İnitial volume in the vat (dm^3) vo=0.05; %Butanol Flow Rate (dm^3/s) Cao=7.72; %Pure concentration of ethyl acetate (mol/dm^3) Cbo=10.93; %Pure concentration of butanol (mol/dm^3) Nao=Cao*V; %Moles of ethyl acetate initially in the vat Fbo=Cbo*vo; %Molar flow rate of butanol (mol/s) t=0:5:10000; %Time variable (s) Xe=(Kc*(1+(Fbo.*t/Nao))-((((Kc*(1+(Fbo.*t/Nao))).^2)-(4*(Kc-1)*Kc(Fbo.*t/Nao))).^(1/2)))/(2*(Kc-1)); plot(t,Xe)
MATLAB: How to plot this equation(‘ Xe=(Kc*(1+(Fbo.*t/Nao))-((((Kc*(1+(Fbo.*t/Nao))).^2)-(4*(Kc-1)*Kc(Fbo.*t/Nao))).^(1/2)))/(2*(Kc-1))’) in MATLAB
warning: subscript indices must either be real positive integers or logicals.
Related Question
- Is this variable “undefined”
- How to convert a 64 bit, two’s complement value(binary vector)[ 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1] into a signed integer
- Function numden() seems to return false solution! Where is the mistake
- How to iterate xa from 0 to 1 with steps of 0.05 in the function r=F*(k*C*(1-xa))/(1+K*C*(1-xa)). All variables are known except for r.
Best Answer