What is type of "Spline" function and how can I solve it mathematically to get coefficients?
조회 수: 1 (최근 30일)
이전 댓글 표시
I used spline function to get cubic spline interpolating and coefficients, but I don't know how can I get these coefficients mathematically, and what is type of this spline(Natural or clamped or ...)? Can anyone help me, please?.
x=[0 1 .5 2 3];
y=[0 1 .5 2 1.5];
c = spline(x,y);
[breaks,coefs,l,k] = unmkpp(c)
coefs=
0.1667 -0.2500 1.0833 0
0.1667 -0.0000 0.9583 0.5000
-0.3333 0.2500 1.0833 1.0000
-0.3333 -0.7500 0.5833 2.0000
댓글 수: 1
답변 (1개)
Stephen23
2017년 2월 6일
편집: Stephen23
2017년 2월 6일
The spline documentation says: "If x and Y are vectors of the same size, the not-a-knot end conditions are used."
You supplied two vectors of the same size, so I think you can figure out which spline curve it is.
If you want to know how to calculate spline coefficients yourself then look up an appropriate textbook or tutorial. This gives an overview of the MATLAB spline algorithms:
댓글 수: 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!