eigΒΆ
eig calculates the eigenvalues and eigenvectors of a square matrix.
- mVal = eig(m)
- <cvVal, mVec> = eig(m)
Return Value
cvVal is a complex vector with eigenvalues. mVec is a real or complex matrix with eigenvectors (arranged column wise).
Parameters
- m
m is a real or complex square matrix.
Example
* m = [1,2,3;4,5,6;7,8,9]
* m
1.0000 2.0000 3.0000
4.0000 5.0000 6.0000
7.0000 8.0000 9.0000
* eig(m)
16.1168 + 0.0000i
-1.1168 + 0.0000i
-0.0000 + 0.0000i
* <val, vec> = eig(m)
* val
16.1168 + 0.0000i
-1.1168 + 0.0000i
-0.0000 + 0.0000i
* vec
0.2320 0.7858 0.4082
0.5253 0.0868 -0.8165
0.8187 -0.6123 0.4082
See also
id-1746190