Least Squares Method for best line fitting
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tharindu Weerakoon
am 26 Feb. 2015
Kommentiert: Tharindu Weerakoon
am 27 Feb. 2015
I have a set of X and Y coordinates data taken from Laser scanning
X=[x1 x2 x3 x4 .....] Y=[y1 y2 y3 y4 .....]
Elements of both the X and Y include some errors.
I tried to find the best fitting line using polyfit and polyval command in matlab, but it can use only to calculate the Yhat w.r.t. X data.
At the end it will give X and Yhat only.
If I want to know calculate both the Xhat and Yhat, how can I use polyfit and polyval ?
0 Kommentare
Akzeptierte Antwort
Torsten
am 26 Feb. 2015
I think you are talking about "orthogonal linear regression".
Try
Polyfit is not suited for this kind of Fitting ; it assumes there are no errors in the independent variable.
Best wishes
Torsten.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!