What do the components of eigenvector represent?

When I use [V,D] = eig(A), V has 2 X 2 matrix. What do the components of V represent? V(1,1) represents the angle between x-axis and principal direction, and V(2,1) represents the angle between y-axis and principal direction?? I would appreciate any help. Thanks,
Jay

Risposte (1)

Youssef  Khmou
Youssef Khmou il 6 Mag 2014
Modificato: Youssef Khmou il 6 Mag 2014
N dimensional matrix is associated with N dimensional canonical base, in this case N=2, you have a plane (x,y), after eigendecomposition you have the diagonal matrix D which contains the spectra of the matrix A and the columns of V are the associated eigenvectors V(:,1)= V1 ex +V2 ey such as V(1,1) and V(2,1) are the x and y components of the first eigenvector .
V(1,1)= ||V1|| cos(theta)
V(2,1)= ||V1|| sin(theta)

8 Commenti

I used 'acosd' and 'asind' to check if the V components are representing the x and y components. For some cases, they are right, but not for all. I got V from one of the matrices which contains [-0.0615;-0.9981]. I calculated theta and I got 93.5259 and -86.4675 degree respectively.
When I use atan2(-0.0615,-0.9981), I got -176.74 degree. Which is correct? Sorry that I might not fully understand your answer. I would appreciate any help.
The correct answer is -93.5259, there is ambiguity is sign (cos(theta)=cos(-theta) :
p=[-0.0615;-0.9981];
theta=-acosd(dot([1 0],p))
You can verify this as p is normalized |p|=1 :
cosd(theta)
sind(theta)
Thanks, Youssef. I would like to confirm if I am doing correctly. When I get D= [D1, 0 ; 0, D4] and V = [V1, V2; V3, V4], and if D1 > D4, D1 is the first principal sth and I need to use V1 and V3 as the principal direction. Am I correct?
Youssef  Khmou
Youssef Khmou il 6 Mag 2014
Modificato: Youssef Khmou il 6 Mag 2014
Yes correct, when you use 'eig', the diagonal elements Dii are sorted in descending order.
What do you mean descending order? D11 is always greater than D22? In my model, sometimes D22 is greater.
check this example : eig(randn(10)), can you post a counter example?
B =
0.2696 0.4800
0.4800 -1.0203
>> [V,D]=eig(B)
V =
-0.3145 -0.9493
0.9493 -0.3145
D =
-1.1793 0
0 0.4287
I am trying to draw principal directions on a plot.
% these codes are in for loop
[V,D] = eig(e2_j_k);
if (D(1,1) > D(2,2))
eigen_j_k = D(1,1);
p= [V(1,1);V(2,1)];
if (V(2,1) < 0)
theta_j_k = -acosd(dot([1 0],p));
else
theta_j_k = acosd(dot([1 0],p));
end
else
eigen_j_k = D(2,2);
p= [V(1,2);V(2,2)];
if (V(2,2) < 0)
theta_j_k = -acosd(dot([1 0],p));
else
theta_j_k = acosd(dot([1 0],p));
end
eval(sprintf('eigen_%d_%d = eigen_j_k',j,k));
eval(sprintf('theta_%d_%d = theta_j_k',j,k));
% I already know xc and zc
xc2(j,k) = xc(j,k) + 0.3*cosd(theta(j,k));
zc2(j,k) = zc(j,k) + 0.3*sind(theta(j,k));
figure(6);
plot([xc(j,k),xc2(j,k)],[zc(j,k),zc2(j,k)]);
hold on;
The code above is that I am trying to draw the directions of principal strain. I don't get any reasonable results. Do you find anything wrong or would you have other ways to draw? Any ideas? I would appreciate any help.
Jay

Accedi per commentare.

Categorie

Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange

Richiesto:

Jay
il 6 Mag 2014

Commentato:

Jay
il 7 Mag 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by