% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utensils.R
\name{dat2cov}
\alias{dat2cov}
\title{Sample covariance matrix of the data tensor.}
\usage{
dat2cov(dat, center)
}
\arguments{
\item{dat}{the \eqn{n \times p1 \times p2} data tensor.}

\item{center}{logical, whether to center the data or not.}
}
\value{
the sample covariance matrix of a given data tensor \code{dat}.
}
\description{
Compute the sample covariance matrix of a given data tensor.
}
\examples{

set.seed(100)
X=array(rnorm(36),dim=c(3,3,4))
dat2cov(X,center=TRUE)

}
\author{
Bongjung Sung
}
