https://github.com/cran/pracma
Revision 9a644c12884525087aa1db3ecf57586b29fb17d8 authored by HwB on 06 June 2011, 00:00:00 UTC, committed by Gabor Csardi on 06 June 2011, 00:00:00 UTC
1 parent 63f1283
Raw File
Tip revision: 9a644c12884525087aa1db3ecf57586b29fb17d8 authored by HwB on 06 June 2011, 00:00:00 UTC
version 0.5-3
Tip revision: 9a644c1
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