Matlab
eig
compute the eigenvalues of a MapleMatrix or MatlabMatrix in MATLAB(R)
Calling Sequence
Parameters
Description
Examples
eig(X)
eig(X, Y)
eig(X, Y, eigenvectors=true, balanced=true)
X
-
MapleMatrix, or MatlabMatrix
Y
(optional) MapleMatrix or a MatlabMatrix
eigenvectors=[true|false]
(optional) return eigenvectors
balanced=[true|false]
(optional) balance the matrix
The eig command computes the eigenvalues of a matrix using MATLAB®.
If you specify the option 'eigenvectors'='true', then both the eigenvectors and the eigenvalues of the matrix are returned. The default is 'eigenvectors'='false'. In this form, the eigenvectors are the columns of the first matrix returned, and the eigenvalues are the entries along the diagonal of the second matrix returned.
If you specify the option 'balanced'='false', then a preliminary balancing step is not computed first. The balancing step improves the conditioning of the matrix X. The default is 'balanced'='true'.
The call Matlab[eig](X, Y) solves the "generalized eigenvalue problem"; that is, it finds the roots of the polynomial det⁡lambda⁢Y−X.
By default a Vector of eigenvalues is returned. When you specify 'eigenvectors'='true', an additional Matrix of eigenvectors is also returned.
Define the Maple matrix
with⁡Matlab:
maplematrix_a≔Matrix⁡1,2,3,3,4,5,6,7,8
maplematrix_a≔123345678
The Eigenvalues of this MapleMatrix are computed as
Matlabeig⁡maplematrix_a
[ 14.0663729752107667 ]
[ ]
[ -1.06637297521077667 ]
[ -15]
[-0.379901471867316940 10 ]
To get the eigenvectors also
vects,vals≔Matlabeig⁡maplematrix_a,eigenvectors=true:
vects
[-0.265647760732583504 , -0.744428627863832570 , 0.408248290463863628]
[-0.491207120532433317 , -0.190701223873281478 , -0.816496580927726145]
[-0.829546160232207730 , 0.639889882112543052 , 0.408248290463862573]
vals
[14.0663729752107667 , 0. , 0.]
[0. , -1.06637297521077667 , 0.]
[0. , 0. , -0.379901471867316940 10 ]
See Also
LinearAlgebra[Eigenvalues]
LinearAlgebra[Eigenvectors]
Matlab[det]
Matlab[evalM]
Matlab[inv]
MatlabMatrix
Download Help Document