Gives generalised eigenvalues and vectors of A.
mat | The matrix of which the eigenvalues are to be calculated. |
details | If the transformation matrix is to be calculated and returned. (Defaults to false, otherwise the return type is structure.) |
return value | The vector d of the eigenvalues, or the structre {d:d, s:S} (S is the (generalised) eigenbasis), depending on the parameter 'details'. |
Currently works only for diagonalisable matrices (i.e. every eigenvector is an algebraic eigenvector).
When second argument is true, a structure is returned, whose elements are:
eig([1,2,3;2,1,3;2,1,2])
s=eig([1,2,3;2,1,3;2,1,2], true)
s.s*diag(s.d)*s.s.inv()