Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

question from:https://stackoverflow.com/questions/66068020/parabola-orientation-polyfit-polyval-matlab

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...