Linear interpolation Using Polyfit

조회 수: 13 (최근 30일)
agung pratama
agung pratama 2020년 10월 8일
댓글: agung pratama 2020년 10월 8일
How do i find p (polyfit) from this X1 and Y1 values i attached
I expect to get like this images

답변 (1개)

Bjorn Gustavsson
Bjorn Gustavsson 2020년 10월 8일
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
agung pratama
agung pratama 2020년 10월 8일
Thanks, but i repeat it because i dont get the answer that i ask for

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Polynomials에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by