"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <lkb5ju$e1i$1@newscl01ah.mathworks.com>...
> Be careful. You're conflating two terms: order and degree. From the
> definition of "Polynomials" as given in the glossary and used by Curve
> Fitting Toolbox (and previously by Spline Toolbox):
>
> http://www.mathworks.com/help/curvefit/list-of-terms-for-spline-fitting.html
>
> "A univariate scalar-valued polynomial is specified by the list of its
> polynomial coefficients. The length of that list is the order of that
> polynomial, and, in this toolbox, the list is always stored as a row vector.
> Hence an m-list of polynomials of order k is always stored as a matrix of
> size [m,k]."
>
> p = [0 0 1 2 3]; % x^2+2*x+3
>
> p represents a polynomial of degree 2 and order 5.
>
> q = [0 0 -1 1 0]; % -x^2+x
>
> q also represents a polynomial of degree 2 and order 5.
>
> r = p+q; 5 [0 0 0 3 3] % 3*x+3
@Steve: thanks for the clarification, now very clear, and I agree that this convention makes good sense. So the Wikipedia article on splines has a different definition of the "order" of a spline. And several books I have out from the University Library agree with Wikipedia's convention. But I'm happy to follow de Boor's lead. The documentation for spap2 should repeat the definition of "order", instead of expecting people to be familiar with the term from some other Mathworks page. I tried searching for "order of spline" in the Mathworks documentation, and drew a blank, after which Google/Wikipedia was the obvious route to follow.
@Steve: can anyone at Mathworks answer my question about how to force spap2 to give a periodic spline? I'm sure there's a trick that achieves this. I need this urgently, having run into problems with installing Bruno's package. Should I ask for support at MathWorks?
> Be careful. You're conflating two terms: order and degree. From the
> definition of "Polynomials" as given in the glossary and used by Curve
> Fitting Toolbox (and previously by Spline Toolbox):
>
> http://www.mathworks.com/help/curvefit/list-of-terms-for-spline-fitting.html
>
> "A univariate scalar-valued polynomial is specified by the list of its
> polynomial coefficients. The length of that list is the order of that
> polynomial, and, in this toolbox, the list is always stored as a row vector.
> Hence an m-list of polynomials of order k is always stored as a matrix of
> size [m,k]."
>
> p = [0 0 1 2 3]; % x^2+2*x+3
>
> p represents a polynomial of degree 2 and order 5.
>
> q = [0 0 -1 1 0]; % -x^2+x
>
> q also represents a polynomial of degree 2 and order 5.
>
> r = p+q; 5 [0 0 0 3 3] % 3*x+3
@Steve: thanks for the clarification, now very clear, and I agree that this convention makes good sense. So the Wikipedia article on splines has a different definition of the "order" of a spline. And several books I have out from the University Library agree with Wikipedia's convention. But I'm happy to follow de Boor's lead. The documentation for spap2 should repeat the definition of "order", instead of expecting people to be familiar with the term from some other Mathworks page. I tried searching for "order of spline" in the Mathworks documentation, and drew a blank, after which Google/Wikipedia was the obvious route to follow.
@Steve: can anyone at Mathworks answer my question about how to force spap2 to give a periodic spline? I'm sure there's a trick that achieves this. I need this urgently, having run into problems with installing Bruno's package. Should I ask for support at MathWorks?