Library: | xplore |
See also: | eigsm sort |
Quantlet: | eigensm | |
Description: | Computes the eigenvalues and eigenvectors of symmetric matrices and arrays and sorts them by their eigenvalues in descending order. |
Usage: | y = eigensm (x) | |
Input: | ||
x | p x p x d1 x d2 x ... x dn array of user-defined data for which the eigenvectors and eigenvalues should be computed. Note that x must be a symmetric matrix or an array of symmetric matrices. | |
Output: | ||
y.values | p x 1 x d1 x d2 x ... x dn array containing the eigenvalues of the supplied matrices in descending order. | |
y.vectors | p x p x d1 x d2 x ... x dn array containing the normalized eigenvectors of the supplied matrices. |
library("xplore") x=#(1,3)~#(3,1) y=eigensm(x) y
Contents of y.values [1,] 4 [2,] -2 Contents of y.vectors [1,] 0.70711 0.70711 [2,] 0.70711 -0.70711