Linear interpolation Using Polyfit
13 次查看(过去 30 天)
显示 更早的评论
How do i find p (polyfit) from this X1 and Y1 values i attached
I expect to get like this images
0 个评论
回答(1 个)
Bjorn Gustavsson
2020-10-8
Repeat question.
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polynomials 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!