2D polynomial fitting with SVD

버전 1.4.0.0 (2.47 KB) 작성자: Richard Whitehead
Fits a polynomial f(x,y) to best fit the data points z using SVD.
다운로드 수: 1.5K
업데이트 날짜: 2011/7/14

라이선스 보기

Use coeffs = fit2dPolySVD(x, y, z, order) to fit a polynomial of x and y so that it provides a best fit to the data z.
Uses SVD which is robust even if the data is degenerate. Will always produce a least-squares best fit to the data even if the data is overspecified or underspecified.
x, y, z are column vectors specifying the points to be fitted.
The three vectors must be the same length.
Order is the order of the polynomial to fit.
Coeffs returns the coefficients of the polynomial. These are in increasing power of y for each increasing power of x, e.g. for order 2:
zbar = coeffs(1) + coeffs(2).*y + coeffs(3).*y^2 + coeffs(4).*x + coeffs(5).*x.*y + coeffs(6).*x^2

Use eval2dPoly(x,y,coeffs) to evaluate the polynomial at any (x,y) points.

If the data is underspecified then the LOWER order coefficients will come out as zero, the solution being a fit using higher orders; use a lower order fit for a more obvious solution in this case.

인용 양식

Richard Whitehead (2024). 2D polynomial fitting with SVD (https://www.mathworks.com/matlabcentral/fileexchange/31636-2d-polynomial-fitting-with-svd), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Eigenvalues에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.4.0.0

Minor change to description

1.3.0.0

Fixed typo in error reporting lines

1.2.0.0

Scaling ignored negative values

1.1.0.0

Corrected typos in description

1.0.0.0