Clear Filters
Clear Filters

How can I fit the roots of a polynomial function?

1 view (last 30 days)
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?

Answers (1)

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

Sign in to comment.

Categories

Find more on Polynomials in Help Center and File Exchange

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!