function Cdot = stiffFcn(t, Conc)
% Function needed to solve a stiff problem in chemical engineering.
% Problem is a 1st order nonlinear ODE with a 3-component unknown
% concentrations.
% This function defines the right-hand side of the ODE.
% It MUST be a COLUMN vector , one element for each component of the
% concentrations.

% I changed the values of the 3 parameter of the problem in order to get
% some result.
% Even then, as you can see from the graph, 
% CB becomes negative for larger values of W.
% This is totally unacceptible physically!
% There is something fishy about this model.

a = 0.4; b = 1; c = 3;
% Actually the above parameters for this function can be included
% as input parameters.
% We will do that some other day.

Cdot = [ -a*Conc(1)+b*Conc(2)*Conc(3); a*Conc(1)-b*Conc(3)-c*Conc(2)^2; c*Conc(2)^2 ];
      