[Scilab-users] Monotone preserving splin

Pinçon Bruno bruno.pincon at univ-lorraine.fr
Sat Apr 22 17:32:02 CEST 2017


Le 22/04/2017 à 11:19, fujimoto2005 a écrit :
> Dear Bruno
>
> Wiki "Monotone_cubic_interpolation" explains the Fritsch-Carlson method
> which uses the finite difference approximations as the derivatives.
> However, splin seems to use the derivative of interpolant as the original
> slope values.
> The interpolant can be determined once we set the additional constraints for
> the derivatives at  x1 and xn.
> I think splin with "monotone" uses some conditions for them and I want to
> understand them exactly.
>

        Dear Fujimoto,

      As far as I remember I simply introduce (long time ago) the 
pchip.f code
   (corresponding to the "monotone" option as one additionnal feature 
for the
   splin function). In this case (and also in cases "fast" and 
"fast-periodic") you
   don't get a cubic spline but a sub-spline which is only one continuously
   differentiable (s" is discontinuous at the breakpoints).

     All splines or sub-splines computed by splin uses on each interval 
[x(i), x(i+1)]
   the Lagrange-Hermite basis/representation for the underlying cubic 
polynomial, that is
   something of the fom :

        p_i(x) = y(i) H_i(x) + y(i+1) H_{i+1}(x) + d(i) K_i(x) + d(i+1) 
K_{i+1}(x)

    and so in each option the splin function computes the slopes d(i).

    The Fritsch-Carlson method uses (like the fast options) a local 
finite difference
   scheme to compute the d(i) but with modifications if the resulting 
cubic polynomial is not
   monotone. So it is not based on spline ideas like minimising the L2 
norm of the
   second derivative with additionnal constraints to ensure monotony.

    hth
  Bruno




More information about the users mailing list