Spline Toolbox | ![]() ![]() |
Construction
Usually, a spline is constructed from some information, like function values and/or derivative values, or as the approximate solution of some ordinary differential equation. But it is also possible to make up a spline from scratch, by providing its knot sequence and its coefficient sequence to the command spmak
.
thus supplying the uniform knot sequence 1:10
and the coefficient sequence 3:8
. Since there are 10 knots and 6 coefficients, the order must be 4(= 10 - 6), i.e., we get a cubic spline. The command
prints out the constituent parts of the B-form of this cubic spline, as follows:
knots(1:n+k) 1 2 3 4 5 6 7 8 9 10 coefficients(d,n) 3 4 5 6 7 8 number n of coefficients 6 order k 4 dimension d of target 1
Further, fnbrk
can be used to supply each of these parts separately.
But the point of the Spline Toolbox is that there shouldn't be any need for you to look up these details. You simply use sp
as an argument to commands that evaluate, differentiate, integrate, convert, or plot the spline whose description is contained in sp
.
![]() | Splines | Example: A Spline Curve | ![]() |