Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: math
See also: eiscg eisrg eigsm

Quantlet: eisrs
Description: computes the eigenvalues and eigenvectors of a real symmetric matrix

Usage: eig = eisrs(a)
Input:
a n x n matrix
Output:
eig.w n x 1 vector of eigenvalues
eig.z n x n matrix of eigenvectors

Example:
library("math")
y1 = #(1, -1, 0)
y2 = #(-1, 2, -1)
y3 = #(0, -1, 1)
a = y1~y2~y3
eig = eisrs(a)
eig.w	; eigenvalues
eig.z	; eigenvectors

Result:
Contents of w
	[1,] -1.5934e-16
	[2,]        1
	[3,]        3
	Contents of z
	[1,]  0.57735  0.70711  0.40825
	[2,]  0.57735 -1.8229e-16  -0.8165
	[3,]  0.57735 -0.70711  0.40825

The exact values of elements that are close
to zero (e.g., w[1], z[2,2]) can differ
dependent on your CPU.



Author: W. Haerdle, F. Noetzel, 20021120 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006