function prob8=project8(~,V)Fa=V(1);Fb=V(2);Fc=V(3);Fd=V(4);Fe=V(5);Fg=V(6);Fw=V(7);k1=0.014;k2=0.007;k3=0.014;k4=0.45;% molar flow rates in mol/s
Fao=10;Fbo=5;%volumetric flow rate dm^3/s
vo=100;%total concentration in mol/dm^3
Cto=0.147;%volume in dm^3
V=1000;Ft=Fao+Fbo;%Total molar flow%
Ft=Fa+Fb+Fc+Fd+Fe+Fg+Fw;%defining each concentration%
Ca=Cto*(Fa/Ft);Cb=Cto*(Fb/Ft);Cc=Cto*(Fc/Ft);Cd=Cto*(Fd/Ft);Ce=Cto*(Fe/Ft);Cg=Cto*(Fg/Ft);Cw=Cto*(Fw/Ft);ra=(-k1*Ca*(Cb^(1/2)))-(k2*Ca^2);rb=-0.5*k1*Ca*(Cb^(1/2));rc=(k1*Ca*(Cb^(1/2)))-(k3*Cc)-(k4*Cd);rd=(0.5*k2*((Ca^2)))-(k4*Cd);re=k3*Cc;rg=k4*Cd;rw=k3*Cc;prob8(1)=ra;prob8(2)=rb;prob8(3)=rc;prob8(4)=rd;prob8(5)=re;prob8(6)=rg;prob8(7)=rw;prob8=prob8';%calling the functiin project8 to solve for each value%
prob8o=[10 5 0 0 1*10^(-16) 0 1*10^(-16)];Vspan=[0 1000];[V,y]=ode45('project8',Vspan, prob8o)plot(V,prob8o(:,1));hold on plot(V,prob8o(:,2));hold onplot(V,prob8o(:,3));hold onplot(V,prob8o(:,4));hold onplot(V,prob8o(:,5));hold on plot(V,prob8o(:,6));hold onplot(V,prob8o(:,7));legend('Fa','Fb','Fc','Fd','Fe','Fw','Fg')title ('Flowrate Vs Volume of Reactor')xlabel('Volume(dm3)')ylabel('Flowrate (mol/s)')
MATLAB: Why is it not graphing the plot? im getting the data but no data points on the graph
graphplot
Best Answer