how to find a polynomial?

5 Ansichten (letzte 30 Tage)
shahul thaufeek
shahul thaufeek am 18 Jun. 2018
Kommentiert: Image Analyst am 24 Jun. 2018
i have data for x and y values,by using these how to find a polynomial X=0.042672375396118 and Y=-0.17386168 , -0.18001581 , -0.19355754 ,
  4 Kommentare
Rik
Rik am 18 Jun. 2018
Actually you don't get corresponding values from polyfit. You get the parameters. So for a third order polynomial described as y=p1*x^3+p2*x^2+p3*x+p4, polyfit will return a vector p formed by p=[p1 p2 p3 p4];
And it does use the least-squares method, as you can read in the doc.
Rik
Rik am 24 Jun. 2018
Please don't use the answer field for comments, nor should you accept an answer if it doesn't solve your question.
If you have three sets of y-values and want to fit a single polynomial to your data, you need to replicate the x-values.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

shahul thaufeek
shahul thaufeek am 23 Jun. 2018
Bearbeitet: Image Analyst am 24 Jun. 2018
Actually I have value like these
data is X value and
other columns are y values
  1 Kommentar
Image Analyst
Image Analyst am 24 Jun. 2018
Looks like you figured it out yourself since you've accepted this answer. So I guess there's nothing left for us to answer or help you out with.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Polynomials finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by