function J = yst_lst(p, tdata, pdata)
% Least Squares fit to Logistic Growth
N = length(tdata);
yst = p(1)*p(2)./(p(1) + (p(2)-p(1))*exp(-p(3)*tdata));
err = pdata - yst;
J = err*err'; % Sum of square errors
end

% 1.234301485043131  12.742134713238052   0.258642884272203
% 0.678071952451872   5.880247587767085   0.057441872756563