Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how one can obtain eigenvalue and eigenvectors from a list of matrices at a single step

how one can obtain eigenvalue and eigenvectors from a list of matrices at a single step?I have tried the following code which results in three matrices and I need only the eigenvector in all three cases that corresponds to the second smallest eigenvalue.

for G in graphs.trees(18): if G.diameter()==5: L=G.laplacian_matrix().eigenvalues() L.sort() if L[1]*L[17]==1: print L G.show() show(G.laplacian_matrix())