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!