spectrum {RMAT} | R Documentation |
Obtain the ordered eigenvalue spectrum of a matrix or ensemble of matrices.
Description
Returns a tidied dataframe of the eigenvalues of a random matrix or ensemble.
Usage
spectrum(
array,
norm_order = TRUE,
singular = FALSE,
components = TRUE,
order = NA
)
Arguments
array |
a square matrix or matrix ensemble whose eigenvalues are to be returned |
norm_order |
sorts the eigenvalue spectrum by its norms if TRUE, otherwise sorts them by sign |
singular |
return the singular values of the matrix or matrix ensemble |
components |
returns the array with resolved real and imaginary components if TRUE, otherwise returns complex-valued eigenvalues |
order |
an integer or integer vector of which eigenvalue orders to return; order 1 representing the largest, order N represents smallest (where N is the number of eigenvalues). If uninitialized, defaults to returning the entire spectrum. |
Value
A tidy dataframe with the real & imaginary components of the eigenvalues and their norms along with a unique index.
Examples
# Eigenvalue spectrum of a random normal matrix
P <- RM_norm(N = 5)
spec_P <- spectrum(P)
Q <- matrix(runif(2^2), ncol = 2)
spec_Q <- spectrum(Q)
# Eigenvalue spectra of ensemble matrices
ens <- RME_norm(N = 3, size = 10)
spec_ens <- spectrum(ens)
[Package RMAT version 0.2.0 Index]