Help solving directional cosines
조회 수: 9 (최근 30일)
이전 댓글 표시
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
채택된 답변
John D'Errico
2021년 2월 7일
편집: John D'Errico
2021년 2월 7일
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
추가 답변 (1개)
Alan Stevens
2021년 2월 7일
편집: Alan Stevens
2021년 2월 7일
Don't the eigenvectors give you the principal axes?
[V,D] = eig(A);
Details:
doc eig
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
