Ratkowsky2

Problem definition

Objective function
f = @(x,b) b(1)./(1+exp(b(2)-b(3).*x))
Problem setup

% NIST certified values

target = zeros(dim,1); target(1) = 7.2462237576E+01; target(2) = 2.6180768402E+00; target(3) = 6.7359200066E-02;

% start 1

ig1 = [100;1;0.1]

% start 2

ig2 = [75;2.5;0.07]

% points to fit

x = zeros(nb,1) y = zeros(nb,1) y(1)=8.930E0; x(1)= 9.000E0 y(2)=10.800E0; x(2)=14.000E0 y(3)=18.590E0; x(3)=21.000E0 y(4)=22.330E0; x(4)=28.000E0 y(5)=39.350E0; x(5)=42.000E0 y(6)=56.110E0; x(6)=57.000E0 y(7)=61.730E0; x(7)=63.000E0 y(8)=64.620E0; x(8)=70.000E0 y(9)=67.080E0; x(9)=79.000E0
Graphic representation
scatter(x,y)

Optimization example with lsqcurvefit

Optimization
rng(0)	

% for tractability

[b,info] = lsqcurvefit(f,ig1,x,y)

% running minimization

Animation
rng(0)
[~,info] = lsqcurvefit(f,ig1,x,y)
info.plot = 'fit'
info.animate = true	

% plot animation

optimview('lsqcurvefit',info)

Related functions

lsqcurvefit | plot | scatter