https://github.com/cran/pracma
Raw File
Tip revision: c1688b374d201c13fb40b4dda2d2a89e34b94ec6 authored by Hans W. Borchers on 23 January 2021, 09:10:02 UTC
version 2.3.3
Tip revision: c1688b3
eye.Rd
\name{eye}
\alias{eye}
\alias{ones}
\alias{zeros}
\title{Some Basic Matrices}
\description{
  Create basic matrices.
}
\usage{
eye(n, m = n)
ones(n, m = n)
zeros(n, m = n)
}
\arguments{
  \item{m, n}{numeric scalars specifying size of the matrix}
}
\value{
  Matrix of size \code{n x m}.
  Defaults to a square matrix if \code{m} is missing.

  No dropping of dimensions; if \code{n = 1}, still returns a matrix and
  not a vector.
}
\seealso{ 
  \code{\link{Diag}},
}   
\examples{
eye(3)
ones(3, 1)
zeros(1, 3)
}
\keyword{ array }

back to top