How does Matlab know the boudary condition of spline while I did not provide?

조회 수: 3 (최근 30일)
Jianwei Guo
Jianwei Guo 2011년 9월 26일
답변: John D'Errico 2020년 11월 15일
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