Non trivial solution to a linear system

5 views (last 30 days)
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 Comments
Serge El Asmar
Serge El Asmar on 27 Oct 2022
If you have encountered that before and can help it would be amazing thanks!
Karim
Karim on 27 Oct 2022
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

Sign in to comment.

Accepted Answer

VBBV
VBBV on 27 Oct 2022
Edited: VBBV on 27 Oct 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 Comment
VBBV
VBBV on 27 Oct 2022
Edited: VBBV on 27 Oct 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

Sign in to comment.

More Answers (1)

Torsten
Torsten on 27 Oct 2022
Edited: Torsten on 27 Oct 2022
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.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!