Formula used to evaluate polynomial using polyval?

2 vues (au cours des 30 derniers jours)
Aarush Sood
Aarush Sood le 9 Avr 2020
Commenté : Steven Lord le 10 Avr 2020
Hey,
I am using polyfit function ([p,S,mu] = polyfit(x,y,n)) to fit nth order polynomial to my data. I want to evalulate that polynomial using polyval function ([y,delta] = polyval(p,x,S,mu)). I would like to know the formulae with which polyval evaluates the function on the back ground.
Thanking You.
Best,
Aarush Sood

Réponses (1)

John D'Errico
John D'Errico le 9 Avr 2020
The formula? It is a polynomial. There is no complicated formula.
But if you want to know how many of the tools in MATLAB work, just look at them. Do NOT use edit.
type polyval
You will see the exact formula.
  2 commentaires
Aarush Sood
Aarush Sood le 9 Avr 2020
Thank You.
But polyfit ([p,S,mu] = polyfit(x,y,n)), normalizes the data. I want the know formula with which polyval converts normalized data to actual data.
Steven Lord
Steven Lord le 10 Avr 2020
See the third part of the Description section on the documentation page for the polyfit function or the description of the mu output argument on that page.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by