Hello,
I am trying to solve a linear system of the form A*x=B with A = K-eigenfreq1(3)*M and B = [0 0 0 0 0]'
K and M are 5x5 matrices and eigenfreq1(3) is just a scalar.
However whenever I use the A\B command to solve the system I get the trivial solution x=[0 0 0 0 0]' and I am told that this solution is not unique. Is there a way to get the other, non trivial, solutions?

4 Kommentare

out of curiosity, why do you not use the build in function eig ?
[ EigenModes , EigenFreq ] = eig( K , M );
Serge El Asmar
Serge El Asmar am 27 Okt. 2022
Because whenever I do I get this error message that I dont know how to solve.
Serge El Asmar
Serge El Asmar am 27 Okt. 2022
If you have encountered that before and can help it would be amazing thanks!
See below for an example. This way you obtain all the natural frequencies and the corresponding modes.
K = rand(5);
M = rand(5);
[ EigenModes , EigenFreq ] = eig( K , M )
EigenModes = 5×5
1.0000 -0.5408 0.3037 0.1309 0.1009 0.1474 -1.0000 -0.7636 -0.7115 -1.0000 -0.7752 -0.5870 -0.5500 -0.6974 0.0851 -0.8842 0.2302 1.0000 1.0000 0.2623 0.6343 0.0215 -0.5822 -0.2689 0.6139
EigenFreq = 5×5
-5.8058 0 0 0 0 0 1.5359 0 0 0 0 0 -0.4406 0 0 0 0 0 -0.0414 0 0 0 0 0 0.1681
EigenFreq = diag( EigenFreq )
EigenFreq = 5×1
-5.8058 1.5359 -0.4406 -0.0414 0.1681

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

VBBV
VBBV am 27 Okt. 2022
Bearbeitet: VBBV am 27 Okt. 2022
syms omega2
K = rand(5);
M = rand(5);
eigF = 0.1; % scalar
eqn1 = det(K-omega2*M) == 0;
eigenfreq1=vpasolve(eqn1,omega2)
eigenfreq1 = 
eigenmodes1 = (K-eigF*M)\ones(5,1) %
eigenmodes1 = 5×1
0.2999 1.0135 -0.1678 1.7206 -0.3961

1 Kommentar

VBBV
VBBV am 27 Okt. 2022
Bearbeitet: VBBV am 27 Okt. 2022
Since input B vector are all zeros, non-trivial solution dont exist. If your input vector are all ones you can get non-trivial solution

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Torsten
Torsten am 27 Okt. 2022
Bearbeitet: Torsten am 27 Okt. 2022

0 Stimmen

However whenever I use the A\B command to solve the system I get the trivial solution x=[0 0 0 0 0]' and I am told that this solution is not unique. Is there a way to get the other, non trivial, solutions?
null(A) gives you a basis for the kernel of A.

Produkte

Version

R2022b

Gefragt:

am 27 Okt. 2022

Kommentiert:

am 27 Okt. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by