home *** CD-ROM | disk | FTP | other *** search
-
- _S_p_l_i_n_e _I_n_t_e_r_p_o_l_a_t_i_o_n
-
- spline(x, y, n=3*length(x), xmin=min(x), xmax=max(x),
- method="fmm")
-
- _A_r_g_u_m_e_n_t_s:
-
- x,y : vectors giving the coordinates of the points
- to be interpolated. Alternatively a single
- plotting structure can be specified.
-
- n : interpolation takes place at n equally spaced
- points spanning the interval [xmin, xmax].
-
- xmin : left-hand endpoint of the interpolation
- interval.
-
- xmax : right-hand endpoint of the interpolation
- interval.
-
- method : this specifies the type of spline to be used.
- Possible values are "fmm", "natural" and
- "periodic".
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- spline performs cubic spline interpolation of the given
- data points. It returns a list containing components
- x, and y which give the ordinates where interpolation
- took place and the interpolated values.
-
- If method="fmm", the spline used is that of Forsythe,
- Malcolm and Moler (an exact cubic is fitted through the
- four points at each end of the data, and this is used
- to determine the end conditions). Natural splines are
- used when method="natural" and periodic splines when
- method="periodic".
-
- _R_e_f_e_r_e_n_c_e_s:
-
- Forsythe, G. E., M. A. Malcolm and C. B. Moler (1977).
- Computer Methods for Mathematical Computations.
-
- _S_e_e _A_l_s_o:
-
- approx, approxfun, splinefun.
-
- _E_x_a_m_p_l_e_s:
-
- x <- 1:10
- y <- rnorm(10)
- plot(x, y)
- lines(spline(x, y))
-
-