| Statistics Toolbox | Search  Help Desk |
| nlinfit | Examples See Also |
Nonlinear least-squares data fitting by the Gauss-Newton method.
Syntax
[beta,r,J] = nlinfit(X,y,'model',beta0)
Description
beta = nlinfit(X,y,'model',beta0) returns the coefficients of the nonlinear function described in 'model'.
'model' is a user-supplied function having the form:
. It returns the predicted values of y given initial parameter estimates,
, and the independent variable, X.
The matrix, X, has one column per independent variable. The response, y, is a column vector with the same number of rows as X.
[beta,r,J] = nlinfit(X,y,'model',beta0) returns the fitted coefficients, beta, the residuals, r, and the Jacobian, J, for use with nlintool to produce error estimates on predictions.
Example
load reactionbetafit = nlinfit(reactants,rate,'hougen',beta)betafit = 1.2526 0.0628 0.0400 0.1124 1.1914
See Also
nlintool