To find the eigenvectors of a matrix in MATLAB, you can use the eig
function. Here's the step-by-step process:
eig
function to compute the eigenvectors.eig
.Here's an example code snippet that demonstrates this process:
main.m414 chars16 lines
Running this code will display the computed eigenvectors v1
and v2
.
Note: The tilde ~
in Step 2 is used to discard the eigenvalues, as we are only interested in the eigenvectors in this case.
gistlibby LogSnag