swh:1:snp:81eadaa089e8253d8469bcef66aa332632c6c669
Tip revision: 7ba95550c2066826c77bc78b974b7cb8cd416301 authored by Hans W. Borchers on 11 January 2017, 00:43:13 UTC
version 1.9.9
version 1.9.9
Tip revision: 7ba9555
eig.R
###
### EIG.R Eigenvalues
###
eig <- function(a) {
if (length(a) == 0) return(matrix(0, nrow=0, ncol=0))
if (length(a) == 1) return(a)
if ((!is.numeric(a) && !is.complex(a)) || !is.matrix(a))
stop("Argument 'a' must be a numeric or complex matrix.")
if (nrow(a) != ncol(a))
stop("Matrix 'a' must be square matrix.")
eigen(a, only.values=TRUE)$values
}