pchip                 package:signal                 R Documentation

_P_i_e_c_e_w_i_s_e _c_u_b_i_c _h_e_r_m_i_t_e _i_n_t_e_r_p_o_l_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Piecewise cubic hermite interpolation.

_U_s_a_g_e:

     pchip(x, y, xi = NULL)

_A_r_g_u_m_e_n_t_s:

     x,y: vectors giving the coordinates of the points to be
          interpolated. 'x' must be strictly monotonic (either
          increasing or decreasing).

      xi: points at which to interpolate. 

_D_e_t_a_i_l_s:

     In contrast to 'spline', 'pchip' preserves the monotonicity of 'x'
     and 'y'.

_V_a_l_u_e:

     Normally, the interpolated signal, an array of 'length(xi)'.

     if 'xi == NULL', a list of class 'pp', a piecewise polynomial
     representation with the following elements:

       x: breaks between intervals. 

       P: a matrix with 'n' times 'd' rows and 'k' columns. The ith row
          of 'P', 'P[i,]', contains the coefficients  for the
          polynomial over the ith interval, ordered from highest to 
          lowest. There must be one row for each interval in x. 

       n: number of intervals ('length(x) - 1'). 

       k: polynomial order. 

       d: number of polynomials. 

_A_u_t_h_o_r(_s):

     Original Octave version by Paul Kienzle pkienzle@user.sf.net.
     Conversion to R by Tom Short.

_R_e_f_e_r_e_n_c_e_s:

     Fritsch, F. N. and Carlson, R. E., "Monotone Piecewise Cubic
     Interpolation," SIAM Journal of Numerical Analysis, vol. 17,
     pp.238-246, 1980.

     Octave Forge <URL: http://octave.sf.net>

_S_e_e _A_l_s_o:

     'approx', 'spline', 'interp1'

_E_x_a_m_p_l_e_s:

     xf = linspace(0,11,500); yf = sin(2*pi*xf/5)
     xp = c(0:10); yp = sin(2*pi*xp/5)
     pch  = pchip(xp, yp, xf)
     plot(xp, yp, xlim=c(0,11))
     lines(xf, pch, col = "orange")

