https://github.com/cran/pracma
Raw File
Tip revision: 71455748623ef69836470c75c5f9384f6e872d45 authored by HwB on 28 June 2011, 00:00:00 UTC
version 0.6-3
Tip revision: 7145574
diffmat.Rd
\name{diffmat}
\alias{diffmat}
\title{
  Difference Matrix
}
\description{
  Difference matrix of a numeric vector.
}
\usage{
diffmat(x)
}
\arguments{
  \item{x}{Numeric vector.}
}
\details{
  The vector \code{x} sits in the diagonal, and the i-th difference vector
  in both i-th secondary diagonals.
}
\value{
  Numeric n-by-n matrix, where \code{n=length(x)}.
}
\examples{
x <- c(1,2,3,5,7,11,13,17,19)
(A <- diffmat(x))
}
\keyword{ array }
back to top