| spectral | R Documentation |
spectral() is a wrapper around base::eigen() designed for Hermitian matrices,
which can handle repeated eigenvalues.
spectral(S, multiplicity = TRUE, tol = .Machine$double.eps^0.5, ...)
S |
a Hermitian matrix. Obs: The matrix is always assumed to be Hermitian, and only its lower triangle (diagonal included) is used. |
multiplicity |
if |
tol |
two eigenvalues |
... |
further arguments passed on to |
The spectral decomposition of S is returned as a list with components
eigvals |
vector containing the unique eigenvalues of |
multiplicity |
multiplicities of the eigenvalues in |
eigvectors |
a |
The Spectral Theorem ensures the eigenvalues of S are real and that the vector space
admits an orthonormal basis consisting of eigenvectors of S. Thus, if s <- spectral(S),
and V <- s$eigvectors; lam <- s$eigvals, then
S = V \Lambda V^{*}
where \Lambda =\ diag(rep(lam, times=s$multiplicity))
base::eigen(), get_eigspace.spectral(),
get_eigproj.spectral(), get_eigschur.spectral(),
act_eigfun.spectral()
spectral(matrix(c(0,1,0,1,0,1,0,1,0), nrow=3))
# Use "tol" to set the tolerance for numerical equality
spectral(matrix(c(0,1,0,1,0,1,0,1,0), nrow=3), tol=10e-5)
# Use "multiplicity=FALSE" to force each eigenvalue to be considered unique
spectral(matrix(c(0,1,0,1,0,1,0,1,0), nrow=3), multiplicity = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.