Effacer les filtres
Effacer les filtres

How can I fit the roots of a polynomial function?

1 vue (au cours des 30 derniers jours)
Edoardo Vicentini
Edoardo Vicentini le 16 Oct 2018
My data can be model as a solution (a root) of a polynomial function. I have a set of (x,y) data that can be model as y^3+(1-k*x)*y^2+2y+1=0 and I want to fit the parameter k. My (x,y) data are one of the solution of this function. How can I do it? And in case for a generic n-th degree polynomial?

Réponses (1)

Torsten
Torsten le 16 Oct 2018
Use lsqnonlin with fun = @(k)ydata.^3+(1-k(1)*xdata).*ydata.^2+2*ydata+1.
Best wishes
Torsten.
  3 commentaires
Torsten
Torsten le 16 Oct 2018
You mean that your model equation has several parameters ki to be fitted ?
Yes, you can.
Edoardo Vicentini
Edoardo Vicentini le 16 Oct 2018
Yes. 3 parameter to be fitted

Connectez-vous pour commenter.

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Tags

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by