fitlin

linear analythic least squares fit
964 Downloads
Updated 23 Jun 2008

No License

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 (2024). fitlin (https://www.mathworks.com/matlabcentral/fileexchange/20352-fitlin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R14SP3
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Linear and Nonlinear Regression in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0