swh:1:snp:1d6f9c912933e835b749aef1f8077112982fe84e
Raw File
Tip revision: 708a2ad382a163d1eef5af0665e3ae2aad200ced authored by HwB on 21 March 2013, 00:00:00 UTC
version 1.4.5
Tip revision: 708a2ad
polypow.Rd
\name{polypow}
\alias{polypow}
\title{Polynomial Powers}
\description{
  Power of a polynomial.
}
\usage{
polypow(p, n)
}
\arguments{
  \item{p}{vector representing a polynomial.}
  \item{n}{positive integer, the exponent.}
}
\details{
  Uses \code{polymul} to multiply the polynomial \code{p} \code{n} times
  with itself.
}
\value{
  Vector representing a polynomial.
}
\note{
  There is no such function in Matlab or Octave.
}
\seealso{
  \code{\link{polymul}}
}
\examples{
polypow(c(1, -1), 6)             #=> (x - 1)^6 = (1  -6  15 -20  15  -6   1)
polypow(c(1, 1, 1, 1, 1, 1), 2)  # 1 2 3 4 5 6 5 4 3 2 1
}
\keyword{ math }
back to top