% Author: Housam Binous

% Non-linear fitting of the Michaelis-Menten model 

% National Institute of Applied Sciences and Technology, Tunis, TUNISIA

% Email: binoushousam@yahoo.com

function f=sumsquares(x)

global time CS

x0=0.027;

% solving the ode for a value of rmax and Km given by x

[time y]=ode45(@rate2,time,x0,[],x);

% computing the sum of squares of difference between
% predicted and experimental data

f=0;

for i=1:14
    f=f+(CS(i)-y(i))^2;
end

end
