How to use lsqlin for best line or ploynormial fitting?
Show older comments
I have a set of X and Y data only.
X=[-11 -10 -9 -8 -6 -4 -2 0 1 2 ] Y=[ 3 5 1 4 6 10 12 12 12.5 12]
I want to calculate the best fitting line for the given set of coordinates. How can I use lsqlin to compute the parameters of the equation.
How can I use it for polynomials?
Answers (1)
Torsten
on 2 Mar 2015
0 votes
Is there any advantage of lsqlin over polyfit you have in mind ?
Best wishes
Torsten.
1 Comment
Tharindu Weerakoon
on 3 Mar 2015
Categories
Find more on Linear Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!