Jumps, i.e., f(x+)-f(x-)
jumps = fnjmp(f,x)
jumps = fnjmp(f,x) is like fnval(f,x) except that it returns the jump f(x+) – f(x–) across x (rather than the value at x) of the function f described by f and that it only works for univariate functions.
This is a function for spline specialists.
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).