B =
1.0e+06 *
0.6064 -0.4550 0.0776 -0.6532 0.4550 0.0126
-0.4550 1.6724 0.0180 0.4550 -0.3209 0.0180
0.0776 0.0180 0.3626 -0.0126 -0.0180 0.0569
-0.6532 0.4550 -0.0126 1.0029 -0.4550 0.5070
0.4550 -0.3209 -0.0180 -0.4550 4.4121 -0.0180
0.0126 0.0180 0.0569 0.5070 -0.0180 0.9314
D1 =
a
b
c
d
e
f
how can i find the unkowns a b c d e f if [B]*[D1]==0 and [D1] is the eigenvector
please give me all the details and the coding because i'm new to MATLAB and i'm still learning it
And thank you in advanced.

2 commentaires

D1 = [0; 0; 0; 0; 0; 0]
seems to be the only solution.
John D'Errico
John D'Errico le 5 Oct 2020
Ameer - correct, in a sense. The matrix is full rank, and therefore no solution exists. The nullspace is theoretically empty. See my comment on Alan's answer.

Connectez-vous pour commenter.

 Réponse acceptée

Alan Stevens
Alan Stevens le 5 Oct 2020
You seem a little confused about eigenvalues and eigenvectors. The following code might provide some clarification:
B = [0.6064 -0.4550 0.0776 -0.6532 0.4550 0.0126;
-0.4550 1.6724 0.0180 0.4550 -0.3209 0.0180;
0.0776 0.0180 0.3626 -0.0126 -0.0180 0.0569;
-0.6532 0.4550 -0.0126 1.0029 -0.4550 0.5070;
0.4550 -0.3209 -0.0180 -0.4550 4.4121 -0.0180;
0.0126 0.0180 0.0569 0.5070 -0.0180 0.9314]*10^6;
[V, D] = eig(B);
% The eigenvalues lie along the diagonal of D
% The corresponding eigenvectors are the columns of V
eigvals = diag(D);
disp('Eigenvalues')
disp(eigvals)
disp('Eigenvectors')
disp(V)
% Test Change n from 1 to 6 to check each one
n = 1;
LHS = B*V(:,n);
RHS = eigvals(n)*V(:,n);
disp('Check')
disp([LHS RHS])
This produces the following eigenvalues and eigenvectors
Eigenvalues
1.0e+06 *
0.0000
0.3368
0.6801
1.2532
2.0983
4.6193
Eigenvectors
-0.7069 0.1149 -0.5810 -0.0407 -0.3522 -0.1543
-0.0279 0.0922 -0.3828 -0.5569 0.7141 0.1551
0.0784 -0.9559 -0.2820 0.0225 -0.0076 0.0018
-0.6145 -0.1437 0.3404 0.4577 0.4967 0.1722
0.0092 -0.0249 0.0754 0.0193 0.2676 -0.9600
0.3400 0.2080 -0.5611 0.6912 0.2185 0.0286

6 commentaires

John D'Errico
John D'Errico le 5 Oct 2020
Modifié(e) : John D'Errico le 5 Oct 2020
All entirely correct. If I might add some information...
When I look at the eigenvalue decomposition, I see this:
[V,D] = eig(B);
diag(D)
ans =
35.532
3.3679e+05
6.8013e+05
1.2532e+06
2.0983e+06
4.6193e+06
So the first eigenvalue is 4 powers of 10 smaller than the rest. Why is that significant? Because all the entries in your array are accurate only to 4 significant digits.
It is almost never a good idea to use these short digit approximations in any numerical computation. When we do, we need to watch out for the numerical complications. One of them is here. The first eigenvalue is EFFECIVELY as close to zero as we can come, at least in terms of this array. The problem is, there are errors that were made in storing those numbers to only 4 digits. They were proportionally on the order of one part in 10000, which explains why the smallest eigenvalue is only zero to within one part in roughly 10000.
So the first eigenvector is as close to the vector you want to solve for. That is V(:,1). When we multiply B by that vector, we see this:
X0 = B*V(:,1)
X0 =
-25.118
-0.99042
2.7866
-21.835
0.32717
12.081
And while those numbers may not seem to be zero, they were as close to zero as we can come, because the elements of B are on the order of 1e6. In fact, there exists no vector which will completely kill off the array B.
rank(B)
ans =
6
So B has full rank. There is no vector X such that B*X will produce zero. But the vector X0 comes as close as mathematics can find.
We can actually find tiny perturbations to the elements of B, each on the order of 0.0001*1e6, such that the new matrix B+Bdelta will indeed be singular. It is not difficult to show how to find such a minimal perturbation matrix. One example is here:
>> [U,S,V] = svd(B);
>> Bdelta = -U(:,6)*S(6,6)*V(:,6)'
Bdelta =
-17.756 -0.70015 1.9699 -15.436 0.23129 8.5405
-0.70015 -0.027608 0.077675 -0.60864 0.0091198 0.33676
1.9699 0.077675 -0.21854 1.7125 -0.025659 -0.94749
-15.436 -0.60864 1.7125 -13.418 0.20106 7.4243
0.23129 0.0091198 -0.025659 0.20106 -0.0030126 -0.11124
8.5405 0.33676 -0.94749 7.4243 -0.11124 -4.1078
Bdelta is the smallest rank 1 perturnation matrix, such that B + Bdelta is a singular matrix.
>> Bhat = B + Bdelta
Bhat =
6.0638e+05 -4.55e+05 77602 -6.5322e+05 4.55e+05 12609
-4.55e+05 1.6724e+06 18000 4.55e+05 -3.209e+05 18000
77602 18000 3.626e+05 -12598 -18000 56899
-6.5322e+05 4.55e+05 -12598 1.0029e+06 -4.55e+05 5.0701e+05
4.55e+05 -3.209e+05 -18000 -4.55e+05 4.4121e+06 -18000
12609 18000 56899 5.0701e+05 -18000 9.314e+05
>> rank(Bhat)
ans =
5
Those perturbations are all on the order of the rounding errors made by storing B to only 4 significant digits. Again, doing so is a bad idea in terms of the mathematics. And while I have managed to show a vector X0 that comes as close as possible to killing off B, there is no assurace the vector I chose is the correct one. It is merely as close as I can come to solving the approximate problem as posed.
The takeaway here to @jad bousaid, is to not use 4 digit approximations to arrays. They will inevitably cause numerical problems.
Alan Stevens
Alan Stevens le 5 Oct 2020
@John Points well made!
John D'Errico
John D'Errico le 5 Oct 2020
An interting question is that while I found the smallest rank 1 update to B that makes it singular, it is possible to find smaller overall pertuurbations to the elements of B that will have the same impact. Or I could have solved for the smallest single element perturbation to B to do that. Each is possible, though they require more effort.
jad bousaid
jad bousaid le 5 Oct 2020
so all i need to do is to take more than 4 decimal places in B to get more accurate results??
thank you very much @John D'Errico.
Bruno Luong
Bruno Luong le 5 Oct 2020
"so all i need to do is to take more than 4 decimal places in B to get more accurate results"
Not really, the lesson you should draw is that never post here a screen capture of matrix displaying alone. Give us your matrix in MAT format, unless you have a code to generate it.
You should avoid communicate numerical data with a screen output.
jad bousaid
jad bousaid le 6 Oct 2020
Modifié(e) : Bruno Luong le 6 Oct 2020
i'll sent you the formula(screenshot205) and also the dimensions(screemshot155) if it will help you:)
A for the colums 0.4*0.8
A for the beams 0.4*0.6
you should calculate this matrix(screenshot205) for each element then add them together to obtain the K matrix
and i almost forget you need the Mass matrix,it is a 6*6 matrix with 84.1 its diagonal.
([K]-w^2[M])Φ=0 you will calculate the values of w^2 then the Φ vectors.
and if i forgot anything please don't hesitate to contact me.
Thank You @Bruno Luong :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by