getPolyFit(x,y,n)

Compute polynomial fitting between vectors 'x' and 'y'
ダウンロード: 27
更新 2017/5/15

ライセンスの表示

call:

[Coeffs, yhat, Residuals] = getPolyFit(x,y,n)

Compute polynomial fitting between vectors 'x' and 'y', and return the coefficients of the n-th order polynomial
used to fit the data, the fitting polynomial function (yhat), and the residuals. If the residuals exhibit "non-random" patterns, it
is an indication that the fit is not so good. To check them: bar(x,Residuals), xlabel('x'), ylabel('ŷ - y')
Note: the function ignores non-finite values(-Inf,Inf,NaN).

INPUT

x : independent variable (column vector)
y : dependent variable I want to estimate (column vector)
n : order of the polynomial I use to fit

OUTPUT

Coeffs : Coefficients of the best-fitting line
yhat : fitting polynomial function
Residuals : difference between observations predicted by the best fit and the real ones

引用

Ruggero G. Bettinardi (2024). getPolyFit(x,y,n) (https://www.mathworks.com/matlabcentral/fileexchange/62950-getpolyfit-x-y-n), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2009a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersPolynomials についてさらに検索
タグ タグを追加

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0