After executing the following command
main.m17 chars2 lines
d will be a diagonal matrix whose elements are the eigenvalues of the system, and v will be a matrix containing the corresponding eigenvectors as its columns.
To extract the eigenvalues, use the diag function to extract the diagonal matrix:
23 chars2 linesTo extract individual eigenvectors, you can index the v matrix:
26 chars2 linesTo compute the mode shapes, you need to normalize the eigenvectors for mass:
81 chars2 lines
You can repeat this for each eigenvector to obtain all the mode shapes.
Note that the eigenvectors are only unique up to a scalar multiple, so different normalization methods may be used depending on the context.
gistlibby LogSnag