Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

eig

Eigenvalue Function (Matlab Style)


Description

Eigenvalues of a matrix

Usage

eig(a)

Arguments

a

real or complex square matrix

Details

Computes the eigenvalues of a square matrix of real or complex numbers, using the R routine eigen without computing the eigenvectors.

Value

Vector of eigenvalues

See Also

Examples

eig(matrix(c(1,-1,-1,1), 2, 2))   #=> 2 0
  eig(matrix(c(1,1,-1,1), 2, 2))    # complex values
  eig(matrix(c(0,1i,-1i,0), 2, 2))  # real values

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.