function xdot=klfun(t,x,flag,cinit,cfinal,tjump) %% Full Model %% Called by F5_6A and F5_6A_Full_Reduced %% cfinal is the height of the step jump %% tjump is the time of the jump %% Carol Lucas kap=1500; kam=38.4; kbp=1500; kbm=385.9; kcp=1.75; kcm=0.1; c = cinit + (cfinal - cinit)*(t>=tjump); pc1=x(1,1); po1=x(2,1); po2=x(3,1); xdot(1,1)=kam*po1-kap*c^4*pc1; xdot(2,1)=kap*c^4*pc1-kam*po1+kbm*po2-kbp*c^3*po1+kcm*(1-po1-po2-pc1)-kcp*po1; xdot(3,1)=kbp*c^3*po1-kbm*po2; %% NOTE: THIS IS A LINEAR SYSTEM SO COULD BE REPLACED BY: %%c = cinit + (cfinal - cinit)*(t>=tjump); %% A=[-kap*c^4 kam 0; %% kap*c^4-kcm -kam-kbp*c^3-kcm-kcp kbm-kcm; %% 0 kbp*c^3 -kbm]; %% b=[0;kcm;0]; %% xdot=A*x+b;