steps to convert spline from B-form to pp-form (fn2fm)
Show older comments
x = [3.0,4.5,6.0,7.5,9.0,12.0,15.0];
y = [0 0.0343653 0.0694232 0.105143 0.141178 0.246013 0.630537];
f_bm = spapi(5, x, y);
f_pp = fn2fm(f_bm, 'pp');
Based on f_bm.knots, it is easy to compute f_pp.breaks. But how is f_pp.coefs calculated? Is there a linear system solved or is there an analytical equation for computing the coefficients based on the control points + knots + degree?
Thank you!
12 Comments
SA-W
on 10 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
Torsten
on 10 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
Why not simply evaluating s, s',..., s^(j) at x = x_i ? This will give c_j*j! in your pp-form expansion around x_i.
SA-W
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
Torsten
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
A polynomial p of order n is determined by p(x0),p'(x0),...,p^(n)(x0) on all of IR for any point x0.
This follows from its Taylor expansion
p(x) = sum_{i=0}^{i=n} p^(i)(x0)/i! * (x-x0)^i
Torsten
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
@SA-W By evaluating the value, first, second, third derivative of the spline in B-form at we have determined the coefficients . Like Torsten said.
Better use the value of the function at x_(i+1) as 4th condition instead of something with third derivatives.
SA-W
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
Bruno Luong
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
Still wonder: if you allow to use stock functions such as fnval fnder why not using fn2fm to convert B-spline to pp form?
Why bother when MATLAB provide a ready-to-go solution?
Torsten
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
Why bother when MATLAB provide a ready-to-go solution?
Maybe for the theory-part of his/her paper on the subject.
SA-W
on 11 Mar 2024
Moved: Bruno Luong
on 11 Mar 2024
SA-W
on 12 Mar 2024
Bruno Luong
on 12 Mar 2024
SA-W
on 12 Mar 2024
Accepted Answer
More Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!












