Statistics Toolbox    
nlinfit

Nonlinear least-squares data fitting by the Gauss-Newton method.

Syntax

Description

beta = nlinfit(X,y,FUN,beta0) returns the coefficients of the nonlinear function described in FUN. FUN can be a function handle specified using @, an inline function, or a quoted text string containing the name of a function.

The function FUN has 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,FUN,beta0) returns the fitted coefficients, beta, the residuals, r, and the Jacobian, J, for use with nlintool to produce error estimates on predictions.

Example

See Also

nlintool


 ncx2stat nlintool