Question: how does nlinfit work in matlab?
Answer: beta = nlinfit( X , Y , modelfun , beta0 ) returns a vector of estimated coefficients for the nonlinear regression of the responses in Y on the predictors in X using the model specified by modelfun . The coefficients are estimated using iterative least squares estimation, with initial values specified by beta0 .