The matlab command $[P,D]=\mathrm {eig} (A)$ yields the matrix $P$, whose columns are the eigenvectors of $A$, and the diagonal matrix $D$, whose entries are the eigenvalues of $A$.