Derivative of M-Splines

90 Views Asked by At

I need to calculate the derivative of an M-Spline. Since an M-Spline is for the interior knots just a rescaled B-Spline, I can just use the same formula as given in the Wikipedia article. However, for all splines whose support touches the boundary knots, which for M-Splines are repeated k times (where k is the degree of the M-Spline), I am getting wrong results when naively applying the formula, compared to a numerical approximation of the gradient (see the plots for the first 3 splines of degree 3). So I guess there is some sort of weighting that has to be done to account for the repetition of the outer knots, but I am not sure how to do it.

enter image description here enter image description here enter image description here