swh:1:snp:887de40c312a4259a22e92c95293ef0f709b045b
Raw File
Tip revision: 3f1c6b45c918375fc2b65bb2a7d6e3590979cb61 authored by HwB on 12 December 2011, 00:00:00 UTC
version 0.9.1
Tip revision: 3f1c6b4
mtrace.Rd
\name{mtrace}
\alias{mtrace}
\title{Matrix trace}
\description{
Sum of the main diagonal elements.
}
\usage{
mtrace(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{mdiag}}, \code{\link{diag}}
}
\examples{
mtrace(matrix(1:16, nrow=4, ncol=4))
}
\keyword{ array }
back to top