How does Matlab know the boudary condition of spline while I did not provide?
3 次查看(过去 30 天)
显示 更早的评论
When I use the spline functions in Matlab, I find most of them don't neeed boundary condition. So, I wondered there must be some way to determine it in Matlab. And I really want to know "How?"
1 个评论
Andreas Goser
2011-9-26
I have just a process, not a real answer, thus putting this as comment. Files like spaps.m and spline.m are written in MATLAB language and thus can be opened in an editor. Maybe you can fnd would you look for in the code.
回答(1 个)
John D'Errico
2020-11-15
Depending on the specific spline tool used, you can often set the boundary conditions. Spline, for example, allows you to set the end point slopes. However, by default, spline uses what are called the not-a-knot end conditions. That is, spline creates an everywhere twice differentiable function. But at the breaks, the third derivative can have a discontinuity. So spline uses a choice of end conditions where third derivative continuity is enforced at the seconf and penultimate break. Effectivey, that makes those break points not truly breaks.
Other splines allow different sets of boundary conditions if you choose to use them. Thus you can create natural cubic splines if you wish.
Finally, some tools like pchip, are not truly splines. They don't really need to use boundary conditions as you describe.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Splines 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!