% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interpol.R
\name{interpol}
\alias{interpol}
\title{Interpolation of data}
\usage{
interpol(
  x,
  y,
  xout = NULL,
  method = "natural",
  n = 3 * length(x),
  print = 0,
  plot = 0
)
}
\arguments{
\item{x}{input vector}

\item{y}{input vector}

\item{xout}{vector at which y is calculated,  or NULL.}

\item{method}{= "constant" or "linear" or "natural" \cr
"spline" can be uses as an alias for "natural".}

\item{n}{# of points in (min(x), max(x)) at which y is calculated
when xout is NULL.}

\item{print}{= 1 to print the result}

\item{plot}{= 1 to plot the result}
}
\value{
A matrix: cbind( xout, yout )
}
\description{
Interpolation of data
}
\examples{
x <- c(1,2,3,4,5,6)
y <- c(1,4,9,7,6,8)
xout <- seq(1, 7, length=10)
sp=interpol( x, y, xout, method="constant", plot=1 )
sp=interpol( x, y, xout, method="linear", plot=1 )
sp=interpol( x, y, xout, method="spline", plot=1 )
}
