Spline coefficients for data point

4 Ansichten (letzte 30 Tage)
felix.b
felix.b am 15 Okt. 2019
Kommentiert: felix.b am 21 Okt. 2019
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

Akzeptierte Antwort

Prabhan Purwar
Prabhan Purwar am 18 Okt. 2019
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 Kommentar
felix.b
felix.b am 21 Okt. 2019
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);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Splines finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by