diff

Differentiate a B-spline representation.


Declaration

 dspline = diff(spline,n)

Parameters

  • spline BSpline instance to differentiate
  • n derivative order

Returns

  • dspline BSpline representing the nth derivative

Discussion

Use this when you want a new spline object representing the derivative, rather than only evaluating derivatives at a set of points.

The implementation applies the standard B-spline coefficient-difference recursion and trims one knot from each end for each derivative taken.

  dspline = diff(spline);
  curvatureSpline = diff(spline, 2);