Mushi
Mushi

Reputation: 367

Parabola Orientation polyfit/polyval (Matlab)

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

enter image description here

Upvotes: 0

Views: 268

Answers (1)

JJacquelin
JJacquelin

Reputation: 1705

Since the axis of the parabola is horizontal the equation is :

enter image description here

Linear least mean squares fitting gives the values of the three parameters.

enter image description here

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

enter image description here

Upvotes: 1

Related Questions