How can I fit the roots of a polynomial function?

1 次查看(过去 30 天)
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?

回答(1 个)

Torsten
Torsten 2018-10-16
Use lsqnonlin with fun = @(k)ydata.^3+(1-k(1)*xdata).*ydata.^2+2*ydata+1.
Best wishes
Torsten.

类别

Help CenterFile Exchange 中查找有关 Polynomials 的更多信息

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by