Reputation: 367
I am trying to fit a parabola using polyfit/polyval
combination in Matlab. However, in some cases, I am not able to align the peak of fitted parabola as it should be with the given data. As an example, please see the attached image. Any idea to fix this problem?
My data points are as follows:
x = 4.13, 5.19, 5.79, 5.83, 5.51, 4.98, 4.35
y = 270, 285, 300, 315, 330, 345, 360
Upvotes: 0
Views: 268
Reputation: 1705
Since the axis of the parabola is horizontal the equation is :
Linear least mean squares fitting gives the values of the three parameters.
If you want a more accurate fitting with non-horizontal axis (general cubic section curve), see page 16 in https://fr.scribd.com/doc/14819165/Regressions-coniques-quadriques-circulaire-spherique
Upvotes: 1