MATLAB Answers

Spline coefficients for data point

5 ビュー (過去 30 日間)
felix.b
felix.b 2019 年 10 月 15 日
コメント済み: felix.b 2019 年 10 月 21 日
Dear colleagues,
how can I get the spline coefficients for a certain data point?
I know that I can get all the coefficients by using the point-operator (as "pp.coefs"). But how can I get the coefficients for a specific data point (x value). Is there an automatic expression?
Best regards,
Felix

  0 件のコメント

サインイン to comment.

採用された回答

Prabhan Purwar
Prabhan Purwar 2019 年 10 月 18 日
Hello,
Spline definesa polynomial among the breakpoints in the curve. To define the coefficient at a particular ‘x value’ there is a need to define an interval among enclosed breakpoints and make use of pp.coefs() as suggested.
Refer to the following link for further information:

  1 件のコメント

felix.b
felix.b 2019 年 10 月 21 日
Thank you, Prabhan!
That's exactly what I did. If someone encounters the same problem, please see the code below.
C = pp.coefs;
b = (pp.breaks)';
j=0;
for k=1:length(C)
if (((xi >= b(k)) && (xi <= b(k+1))) && (j==0))
j=k;
break
end
end
xS1 = b(j);

サインイン to comment.

その他の回答 (0 件)

サインイン してこの質問に回答します。


Translated by