2D Weighted Polynomial Fitting and Evaluation

バージョン 1.0.0.0 (19.9 KB) 作成者: Salman Rogers
Two scripts: polyfitweighted2 fits 2D data with weights, and polyval2 evaluates the 2D polynomial
ダウンロード: 8.1K
更新 2007/2/12

ライセンスがありません

polyfitweighted2.m and polyval2.m
---------
polyfitweighted2.m: Find a least-squares fit of 2D data z(x,y) with an n th order polynomial, weighted by w(x,y).

polyval2.m: Evaluate 2D polynomial produced by polyfitweighted2.m.

Usage polyfitweighted2
-----
P = polyfitweighted2(X,Y,Z,N,W) finds the coefficients of a polynomial P(X,Y) of degree N that fits the data Z best in a least-squares sense. P is a row vector of length (N+1)*(N+2)/2 containing the polynomial coefficients in ascending powers, 0th order first.

P = [p00 p10 p01 p20 p11 p02 p30 p21 p12 p03...]

where pNM is the polynomial coefficient of the Nth power of X times the Mth power of Y.

based on polyfit.m by The Mathworks Inc.

For more information see HTML-published M-file included.

Note: P is not in the format of standard Matlab 1D polynomials. Use polval2.m to evaluate the polynomial in this format, at given values of x,y.

Usage polyval2
---
Z = POLYVAL2(P,X,Y) returns the value of a 2D polynomial P evaluated at (X,Y). P is a vector of length (N+1)*(N+2)/2 containing the polynomial coefficients in ascending powers as above.

引用

Salman Rogers (2024). 2D Weighted Polynomial Fitting and Evaluation (https://www.mathworks.com/matlabcentral/fileexchange/13719-2d-weighted-polynomial-fitting-and-evaluation), MATLAB Central File Exchange. 取得済み .

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

ヒントを与えたファイル: 2D polynomial fitting with SVD, polyVal2D and polyFit2D

Community Treasure Hunt

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

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

minor edit to improve discription