In which order does polyfit command display coefficients?
Afficher commentaires plus anciens
Hello everyone,
I have a question that arose when reading the polyfit explanation. It says: "p = polyfit(x,y,n) returns the coefficients for a polynomial p(x) of degree n that is a best fit for the data in y. The coefficients in p are in descending powers".
The following example (from the same small article), however, shows that the coefficients are ascending from p1 to pn:
p(x)=p1*xn+p2*xn−1+...+pn*x+pn+1.".
I am confused. If my polyfit output for a first degree polynomial is 1.33 and -4.5, in which order would they appear in the corresponding equation?
Thank you!
[SL: edited to remove some extraneous hyperlinks]
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Polynomials dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!