Help solving directional cosines

4 views (last 30 days)
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?

Accepted Answer

John D'Errico
John D'Errico on 7 Feb 2021
Edited: John D'Errico on 7 Feb 2021
A=[-130.342, -75, -55;
-75, -130.342, 65;
-55, 65, -130.342];
svd(A)
ans = 3×1
207.0514 183.9751 0.0005
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)))
d = 
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)
Ahat = 3×3
-130.342477630372 -75 -55 -75 -130.342477630372 65 -55 65 -130.342477630372
null(Ahat)
ans = 3×1
0.578863938969452 -0.605463241613676 -0.54619667082053
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)
ans = 3×1
-0.578863938969451 0.605463241613676 0.54619667082053
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)
V = 3×3
0.589309935177226 0.563587030069168 0.578863938969451 0.773587612538582 -0.187019968937852 -0.605463241613676 -0.232972114271793 0.804607476199606 -0.54619667082053
D = 3×3
-207.051388315081 0 0 0 -183.975089315291 0 0 0 0.000477630372280663
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.

More Answers (1)

Alan Stevens
Alan Stevens on 7 Feb 2021
Edited: Alan Stevens on 7 Feb 2021
Don't the eigenvectors give you the principal axes?
[V,D] = eig(A);
Details:
doc eig

Categories

Find more on Stress and Strain in Help Center and File Exchange

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!