%% pwgaufitb.m is called by pwgaufit.m to minmise the
%% fit of the pwgauss function to the inputted data.
%%

function chi=pwgaufitb(c,x,y)

chi=sum((y-pwgauss(c(1),c(2),c(3),x)).^2);