Help solving directional cosines
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Christopher Morrow
le 7 Fév 2021
Modifié(e) : John D'Errico
le 7 Fév 2021
A=[-130.342, -75, -55;
-75, -130.342, 65;
-55, 65, -130.342]
null(A)
ans =
3×0 empty double matrix
I am trying to solve this homogeneous system of linear equations to find the directional cosines of principal stresses in stress cube not sure what I ought to do here. Anyone have guidence?
0 commentaires
Réponse acceptée
John D'Errico
le 7 Fév 2021
Modifié(e) : John D'Errico
le 7 Fév 2021
A=[-130.342, -75, -55;
-75, -130.342, 65;
-55, 65, -130.342];
svd(A)
That small number as the third element of the svd tells me your matrix is not truly singular. It is close. But not exactly so. This points out the flaw with using inaccurate numbers. When you use only low digit approximations to your values, expect things to fail. Null won't work here, because A is NOT singular. It is not even numerically singular. It is close. But close is not worth a lot in mathematics.
The point is, there is no non-trivial (non-zero) solution to a linear homogeneous system when the matrix is not singular.
Since all of the elements of A are integer except for the diagonals, how much of a perturbation would we need to have for null to succeed?
syms del
d = vpasolve(det(A + del*eye(3)))
So d(1) is the perturbation we would need to add to the diagonal elements of A. We could also have changed the diagonal elements using the other two values of d, but that is clearly not what you are looking for.
format long g
Ahat = A + double(d(1))*eye(3)
null(Ahat)
Next time, use the correct values for the elements of A, and null will work properly.
Could I have avoided finding the perturbation necessary to make null happy? Well, to some extent, yes. Since the necessary perturbation was so small, we could have just looked at the third singular vector from the columns of V.
[U,S,V] = svd(A);
V(:,3)
However, if the diagonal elements of A were in error by some more significant amount, then this would actually change the singular vectors. The same would apply to using eig to find that vector. So you arguably should not simply use svd or eig directly to compute that vector.
However, if this really is the matrix in question, and you want to compute the principal vectors, then eig or svd will suffice.
[V,D] = eig(A)
The columns of V are the vectors you want. Again, see that V(:,3) is the same as we computed before. It appears this is approximately a plane stress problem. There are effectively very small stresses seen in that particular direction. But they are not zero.
0 commentaires
Plus de réponses (1)
Alan Stevens
le 7 Fév 2021
Modifié(e) : Alan Stevens
le 7 Fév 2021
Don't the eigenvectors give you the principal axes?
[V,D] = eig(A);
Details:
doc eig
0 commentaires
Voir également
Catégories
En savoir plus sur Linear Algebra dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!