Learn R Programming

gasper (version 1.1.6)

eigensort: Spectral Decomposition of a Symmetric Matrix

Description

eigensort performs the spectral decomposition of a symmetric matrix. The eigenvalues and eigenvectors are sorted in increasing order by eigenvalues.

Usage

eigensort(M)

Value

A list containing:

  • evalues: A vector of sorted eigenvalues in increasing order.

  • evectors: A matrix of corresponding eigenvectors.

Arguments

M

Symmetric matrix, either sparse or dense, to be decomposed.

Examples

Run this code
A <- matrix(1, ncol=2, nrow=2)
dec <- eigensort(A)

Run the code above in your browser using DataLab