b = robustfit(X, y)
b = robustfit(X, y, wfun, tune, const)
[b, stats] = robustfit(...)
robustfit fits a linear regression model using iteratively reweighted least squares.
By default, a constant column is added before fitting. Supported weight functions include bisquare, huber, fair, cauchy, welsch, talwar, andrews, logistic, ols, and function handles.
x = (1:10)';
y = 10 - 2*x + randn(10,1);
[b, stats] = robustfit(x, y)
| Version | Description |
|---|---|
| 2.0.0 | initial version |