Spline Toolbox
  Go to function:
    Search    Help Desk 
fnjmp    Examples   See Also

Jumps, i.e. f(x+) - f(x-)

Syntax

Description

This is an M-file for spline specialists. It returns, for the univariate function f described by f, the value f(x+) - f(x-) of the jump across x made by f. If x is a matrix, then jumps is a matrix of the same size containing the jumps of f across the points in x.

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), consistent with the fact that the spline in question is a so called perfect cubic B-spline, i.e., has an absolutely constant 3rd 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 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

ppalldm2, spalldm2



[ Previous | Help Desk | Next ]