https://github.com/cran/pracma
Raw File
Tip revision: e970b8e92676e0d1f2c84b116f0bad93b03b89c6 authored by Hans W. Borchers on 15 December 2019, 21:30:02 UTC
version 2.2.9
Tip revision: e970b8e
trace.Rd
\name{Trace}
\alias{Trace}
\title{Matrix trace}
\description{
Sum of the main diagonal elements.
}
\usage{
Trace(a)
}
\arguments{
  \item{a}{a square matrix}
}
\details{
Sums the elements of the main diagonal of areal or complrx square matrix.
}
\value{
scalar value
}
\note{
The corresponding function in Matlab/Octave is called trace(), but this in \R
has a different meaning.
}
\seealso{
\code{\link{Diag}}, \code{\link{diag}}
}
\examples{
Trace(matrix(1:16, nrow=4, ncol=4))
}
\keyword{ array }
back to top