function[ss]=ss_logistic(b,data) tvec = data.tvec; yvec = data.yvec; model = logistic(b,tvec); ss = sum( (model-yvec).^2 );