function y=exc13(t,u)

% rate constants
K = 5e15;

k11 = 4.5e-4; 
k12 = 8.5e-20; 
k21 = 5.62;  
k22 = 2.5e-6;
k31 = 1e-3;
k32 = k31/K;

% reaction rates
r11 = k11*u(1); 
r12 = k12*u(2)*u(3);
r21 = k21*u(2)*u(4); 
r22 = k22*u(5)*u(3);
r31 = k31*u(1)*u(4);
r32 = k32*u(5)*u(3);

%figure(1)      
%plot(t,r11,'+',t,r31,'.')       %Skriver ut reaktionshastigheterna
%hold on

y=zeros(size(u));

y(1) = r12-r11+r32-r31;   %CH3Cl
y(2) = r11-r12+r22-r21;   %CH3+
y(3) = r11-r12+r31-r32;   %Cl-
y(4) = r22-r21+r32-r31;   %OH-
y(5) = r21-r22+r31-r32;   %CH3OH

%legend('CH_3Cl','CH_3^+','Cl^-','OH^-','CH_3OH')