MATLAB: How to get specific eigenvectors

eigenvaluesmassstiffnesssystem

Hello, im starting to use the function 'eig' to calculate the eigenvalues and eigenvectors of a problem. In theory, to calculate them i always had the first coordinate of each eigenvector to be equal to 1, but i do not know how to set that condition in MATLAB. The system would be as follows, where i want to calculate the eigenvectors of the A matrix according to the conditions stated above.
M=[1 0 0 0 0 0 0 0 0 0;
0 1 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0;
0 0 0 1 0 0 0 0 0 0;
0 0 0 0 1 0 0 0 0 0;
0 0 0 0 0 2 0 0 0 0;
0 0 0 0 0 0 3 0 0 0;
0 0 0 0 0 0 0 3 0 0;
0 0 0 0 0 0 0 0 4 0;
0 0 0 0 0 0 0 0 0 1];
K=[1 -1 0 0 0 0 0 0 0 0;
-1 3 0 0 0 0 -2 0 0 0;
0 0 3 -1 0 0 0 -2 0 0;
0 0 -1 1 0 0 0 0 0 0;
0 0 0 0 1 -1 0 0 0 0;
0 0 0 0 -1 3 -2 0 0 0;
0 -2 0 0 0 -2 8 -4 0 0;
0 0 -2 0 0 0 -4 11 -5 0;
0 0 0 0 0 0 0 -5 10 -5;
0 0 0 0 0 0 0 0 -5 5];
A=inv(M)*K;

Best Answer

I don't fully understand your question. Do you just mean that you want to normalize the eigenvector such that the first element of each eigenvector is equal to 1? Then you could just do
V = V/V(1);
That will still be an eigenvector (unless the first element is zero, in which case you cannot achieve what you want without some further manipulations).
Related Question