ex13_9a - rb=-k1*x(1)*x(2)-k3*x(2)*x(7); rc=k1*x(2)*x(1);

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

% "ex13_9a" % m-file to solve example 13.9 Part 1 % % 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_9a(t,x) f k1=1; k2=1; k3=1; E1=-2.104*t^4+4.167*t^3-1.596*t^2+0.353*t-0.004; E2=-2.104*t^4+17.037*t^3-50.247*t^2+62.964*t-27.402;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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.26 E=E1; else E=E2; 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