Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

curve fitting - 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

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...