フィルターのクリア

How to calculate polynomial coefficient in this case?

1 回表示 (過去 30 日間)
Chaou
Chaou 2013 年 5 月 28 日
Hollo. I want to formulate P(x) as a polynomial function,
So: P(x) = C1 + C2 * X + C3 * X^2 + C4 * X^3 + C5 * X^4 ...... + Cn * X^n-1.
How do I do to obtain C1, C2, C3, C4, ........... Cn ?
Knowing that (for example):
P(1)=1
P(2)=3
P(3)=9
. . . . P(10)=1200... etc.
Thanks!

回答 (2 件)

Matt J
Matt J 2013 年 5 月 28 日
Use POLYFIT
  1 件のコメント
Matt J
Matt J 2013 年 5 月 28 日
編集済み: Matt J 2013 年 5 月 28 日
However, a 10-th order polynomial, like in your example, could be hard to fit.

サインインしてコメントする。


Roger Stafford
Roger Stafford 2013 年 5 月 28 日
編集済み: Matt J 2013 年 5 月 29 日
Another possibility is to use the Lagrange formulation of the polynomial in symbolic form and then use the Symbolic Toolbox 'collect' function on that expression. Or better still use 'coeffs'. See
Note: With ten points the Lagrange polynomial will admittedly be tedious to construct, but you can do it.

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by