fitlin

linear analythic least squares fit

You are now following this Submission

Linear fit using least squares analythic computations. X is the independent variable, Y is the dependent variable, is the vector of the standard deviations of Y. The errors on a and b are calculated, too. The fit procedure weights each Y data with its own variance, so that points with big variance have a little influence. If SY i constant, fit is possible but all points will have the same weight.
The correlation coefficient is calculated by corrcoef, so it is independent on the computed coefficients. This fit is useful when you have to know exactly what the fit does, in fact the formula is absolutely deterministic.

Cite As

Angelini Federico (2026). fitlin (https://www.mathworks.com/matlabcentral/fileexchange/20352-fitlin), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0