function [fit_out,x,err] = FitGammaSig(values_in,measurements,values_out,x0)
% [fit_out,x,err] = FitGammaSig(values_in,measurements,values_out,x0)
%
% Fit sigmoid function to gamma data.

% Standard minimization sequence
options = foptions;
options(1) = 0;
options(14) = 600;
x = constr('FitGammaSigFun',x0,options,[],[],[],values_in,measurements);

% Now compute fit values and error to data for return
fit_out = ComputeGammaSig(x,values_out);
err = FitGammaSigFun(x,values_in,measurements);
