ex13_9c - E4=0 rb=-k1*x(1*x(2-k3*x(2*x(7 rc=k1*x(2*x(1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% "ex13_9c" % m-file to solve example 13.9 Part 3 % % x(1)=ca % x(2)=cb % x(3)=cc % x(4)=cabar % x(5)=cbbar % x(6)=ccbar % x(7)=cd % x(8)=ce % x(9)=cdbar % x(1)=cebar % xdot(1)=d(ca)/dt, xdot(2)=d(cb)/dt, etc. % function xdot=ex13_9c(t,x) f k1=1; k2=1; k3=1; E1=0.47219*t^4-1.30733*t^3+0.31723*t^2+0.85688*t+0.20909; E2=3.83999*t^6-58.16185*t^5+366.20970*t^4-1224.66963*t^3+2289.84857*t^2- 2265.62125*t+925.46463; E3=0.0041*t^4-0.07593*t^3+0.52276*t^2-1.59457*t+1.84445;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: E4=0; rb=-k1*x(1)*x(2)-k3*x(2)*x(7); rc=k1*x(2)*x(1); ra=-k1*x(1)*x(2)-k2*x(1); re=k3*x(2)*x(7); rd=k2*x(1)-k3*x(2)*x(7); r if t <=1.82 E=E1; elseif t<=2.8 E=E2; elseif t<6 E=E3; else E=E4; end e xdot(1,:)=ra; xdot(2,:)=rb; xdot(3,:)=rc; xdot(4,:)=x(1)*E; xdot(5,:)=x(2)*E; xdot(6,:)=x(3)*E; xdot(7,:)=rd; xdot(8,:)=re; xdot(9,:)=x(7)*E; xdot(10,:)=x(8)*E; x...
View Full Document

This note was uploaded on 09/02/2011 for the course CHEM 102 taught by Professor Kmn during the Spring '11 term at Babson College.

Ask a homework question - tutors are online