I need the algorithm behind polyfit function in Matlab

Hi, I need the algorithm behind polyfit function of matlab. I have a 3rd order polynomial curve. I need to find a polynomial best fit for the curve. kindly help me with the algorithm n procedure. Reply me to agsagastheesh@gmail.com. Thank you.

답변 (1개)

Walter Roberson
Walter Roberson 2012년 6월 26일
Algorithms
The polyfit MATLAB file forms the Vandermonde matrix, V, whose elements are powers of x. v(i,j) = x(i)^(n-j)
It then uses the backslash operator, \, to solve the least squares problem Vp≅y.
You can modify the MATLAB file to use other functions of x as the basis functions.

카테고리

도움말 센터File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

질문:

AGS
2012년 6월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by