Computes the eigenvalues and eigenvectors for real or complex square matrices. eig(a) solves the standard problem a x = lambda*x. eig(a, b) solves the general problem a x = lambda*b x.
ev = eig(a)
ev = eig(a, b)
[evec, evdiag] = eig(a)
[evec, evdiag] = eig(a, b)
Square matrix whose dependent matrices are also square.
Matrix of the same size as a.
Eigenvalues of a or the generalized eigenvalues of a and b. ev is a vector.
Square matrix whose columns are the normalized eigenvectors of a or the normalized generalized eigenvectors of a and b.
Matrix of the same type as a with the elements of ev on the diagonal.