Linear interpolation Using Polyfit

How do i find p (polyfit) from this X1 and Y1 values i attached
I expect to get like this images

Respuestas (1)

Bjorn Gustavsson
Bjorn Gustavsson el 8 de Oct. de 2020

0 votos

Repeat question.
What's missing from the answer I gave you here: Using polyfit for linear regression?
Perhaps explicitly telling you to use the call to polyfit in the documentation? Well do that, and you'll get a 7th order polynomial approximation to the sin-curve in that intervall.
Polynomial regression will not easily give you linear interpolation though, that is a completely different operation where you get points on line-segments connecting your data-points. See the help and documentation for interp1, for more information about that.

1 comentario

agung pratama
agung pratama el 8 de Oct. de 2020
Thanks, but i repeat it because i dont get the answer that i ask for

Iniciar sesión para comentar.

Categorías

Más información sobre Interpolation en Centro de ayuda y File Exchange.

Preguntada:

el 8 de Oct. de 2020

Comentada:

el 8 de Oct. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by