% OBJECTIVE FUNCTION
f = @(x,b) (b(1)./b(2)).*exp(-0.5*((x - b(3))./b(2)).^2)

% PROBLEM SETUP
NIST_Eckerle4

% GRAPHIC REPRESENTATION
scatter(x,y)

% OPTIMIZATION 
rng(0)	% for tractability 
[b,info] = lsqcurvefit(f,ig1,x,y)	% running minimization 

% ANIMATION
% Uncomment the following code to generate animation % 
% rng(0)
% [~,info] = lsqcurvefit(f,ig1,x,y)
% info.plot = 'fit'
% info.animate = true	% plot animation 
% info.animfreq = 5	% frame frequency 
% optimview('lsqcurvefit',info) 