get_eigspace.spectral | R Documentation |
Get the eigenbasis associated with an eigenvalue based on the representation
of a Hermitian Matrix given by class spectral
.
## S3 method for class 'spectral'
get_eigspace(object, id, ...)
object |
an instance of class |
id |
index for the desired eigenspace according to the ordered (decreasing) spectra. |
... |
further arguments passed to or from other methods. |
A matrix whose columns form the orthonormal eigenbasis.
If s <- spectral(A)
and V <- s$eigvectors
, then the extracted eigenspace
V_{id}
is some submatrix V[, _]
.
spectral()
, get_eigspace()
# Spectra is {2, -1} with multiplicities one and two respectively.
decomp <- spectral(matrix(c(0,1,1,1,0,1,1,1,0), nrow=3))
# Returns the two orthonormal eigenvectors corresponding to the eigenvalue -1.
get_eigspace(decomp, id=2)
# Returns the eigenvector corresponding to the eigenvalue 2.
get_eigspace(decomp, id=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.