Fastest way to fit a parabola to set of points?

后端 未结 4 1251

Given a set of points, what\'s the fastest way to fit a parabola to them? Is it doing the least squares calculation or is there an iterative way?

Thanks

Edit

4条回答
  •  忘掉有多难
    2020-12-20 22:06

    A calculated solution is almost always faster than an iterative solution. The "exception" would be for low iteration counts and complex calculations.

    I would use the least squares method. I've only every coded it for linear regression fits but it can be used for parabolas (I had reason to look it up recently - sources included an old edition of "Numerical Recipes" Press et al; and "Engineering Mathematics" Kreyzig).

提交回复
热议问题