# HG changeset patch # User Rik # Date 1544506899 28800 # Node ID 33e6ab3e14917f3c9bc0accffdea22f6b41775bb # Parent 704cd93ca74898356ce13fe42e9451242da73d39 mkpp.m: Document how ppval will calculate values for each piecewise section (patch #9095). * mkpp.m: Add Programming Note to documentation explaining how the lower bound of the piecewise segment will be subtracted from the value of the polynomial calculated for that segment. diff -r 704cd93ca748 -r 33e6ab3e1491 scripts/polynomial/mkpp.m --- a/scripts/polynomial/mkpp.m Mon Dec 10 17:23:17 2018 -0800 +++ b/scripts/polynomial/mkpp.m Mon Dec 10 21:41:39 2018 -0800 @@ -42,6 +42,10 @@ ## @var{r}-th polynomial defined on interval @var{i}. In any case @var{coefs} ## is reshaped to a 2-D matrix of size @code{[@var{ni}*prod(@var{d}) @var{m}]}. ## +## Programming Note: @code{ppval} evaluates polynomials at +## @code{@var{xi} - @var{breaks}(i)}, i.e., it subtracts the lower endpoint of +## the current interval from @var{xi}. This must be taken into account when +## creating piecewise polynomials objects with @code{mkpp}. ## @seealso{unmkpp, ppval, spline, pchip, ppder, ppint, ppjumps} ## @end deftypefn