| Library: | math |
| Macro: | eisrs | |
| Description: | Computes the eigenvalues and eigenvectors of a real symmetric square matrix |
| Usage: | {w, z} = eisrs(a) | |
| Input: | ||
| a | n x n matrix | |
| Output: | ||
| w | n x 1 vector of eigenvalues | |
| z | n x n matrix of eigenvectors | |
library("math")
y1 = #(1, -1, 0)
y2 = #(-1, 2, -1)
y3 = #(0, -1, 1)
a = y1~y2~y3
{w, z} = eisrs(a)
w
z
Contents of w [1,] -2.5653e-16 [2,] 1 [3,] 3 Contents of z [1,] 0.57735 0.70711 0.40825 [2,] 0.57735 -2.8623e-16 -0.8165 [3,] 0.57735 -0.70711 0.40825
| Library: | math |