| Spline Toolbox | ![]() |
Syntax
Description
fnjmp(f,x)
returns, for the univariate function
described by f, the value
of the jump across x made by
. If x is a matrix, then jumps is a matrix of the same size containing the jumps of
across the sites in x.
This is a function for spline specialists.
Examples
fnjmp(ppmak(1:4,1:3),1:4) returns the vector [0,1,1,0] since the pp function here is 1 on [1 .. 2], 2 on [2 .. 3], and 3 on [3 .. 4], hence has zero jump at 1 and 4 and a jump of 1 across both 2 and 3.
If x is cos([4:-1:0]*pi/4), then fnjmp(fnder(spmak(x,1),3),x) returns the vector [12 -24 24 -24 12] (up to round-off). This is consistent with the fact that the spline in question is a so called perfect cubic B-spline, i.e., has an absolutely constant third derivative (on its basic interval). The modified command
returns instead the vector [0 -24 24 -24 0], consistent with the fact that, in contrast to the B-form, a spline in ppform does not have a discontinuity in any of its derivatives at the endpoints of its basic interval. Note that fnjmp(fnder(spmak(x,1),3),-x) returns the vector [12,0,0,0,12] since -x, though theoretically equal to x, differs from x by roundoff, hence the third derivative of the B-spline provided by spmak(x,1) does not have a jump across -x(2),-x(3), and -x(4).
See Also
| fnint | fnmin | ![]() |