Skip to content

eigsort.m

Basic Information

  SYNTAX:  eigsort(A), d = eigsort(A), OR [V,d] = eigsort(A)

  PURPOSE:  Calculate eigenvectors V and vector of eigenvalues d,
       sorted by real part.   Works the same as eig.m, except eigenvectors
       are always returned as a vector (eig returns sometimes as a vector,
       sometimes as a diagonal matrix) and eigenvalues are sorted.

  INPUT:
       A = matrix to calculate eigenvalues for

  OUTPUT: (see eig.m)
       V = eigenvectors of A
       d = eigenvalues of A, i'th eigenvector corresponds to V(:,i)

Dependencies