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
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
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.

类别

Help CenterFile Exchange 中查找有关 Splines 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by