|
Contents | Previous | Next | Subchapters |
| Syntax |
eigsym(x)x,e) |
| See Also | symeig , eigen , svd |
If the argument e is present the eigenvectors of
x are also computed.
The input value of e does not matter and its
output value is a
unitary matrix
,
with the same type and dimension as x,
containing the eigenvectors.
The return value is a column vector with the same type and row dimension
as x containing the eigenvalues. If r is the return value,
e * diag(r) = x * e
where diag(r) is the diagonal matrix with r along its diagonal.
This routine computes the eigenvalues and eigenvectors directly.
The routine symeig
uses an SVD factorization to
compute the eigenvectors.
x = {[3., 1.], [1., 3.]}
e = novalue
eigsym(x, e)
O-Matrix will respond
{
2
4
}
If you continue by entering
e * e'
O-Matrix will respond
{
[ 1 , 0 ]
[ 0 , 1 ]
}
(Note that the complex conjugate is not necessary because e
has the same type as x and hence is a real matrix.)
If you continue by entering
e * diag({2, 4}) - x * e
O-Matrix will respond
{
[ 0 , 0 ]
[ 0 , 0 ]
}