how do I solve symbolic eigenvalue?

20 visualizzazioni (ultimi 30 giorni)
marzie jamshidi
marzie jamshidi il 20 Mag 2022
Commentato: Walter Roberson il 23 Feb 2023
this is my code:
syms ei l
h=l/4;
k=(2*ei/h^3)*[6 -3*h -6 -3*h; -3*h 2*h^2 3*h h^2; -6 3*h 6 3*h; -3*h h^2 3*h 2*h^2];
m=(1/(30*h))*[36 -3*h -36 -3*h; -3*h 4*h^2 3*h -h^2; -36 3*h 36 3*h; -3*h -h^2 3*h 4*h^2];
K(1,:)=[];
K(:,1)=[];
M(1,:)=[];
M(:,1)=[];
[v,d]=eig(K,M)
i recieved this error:
Error using sym/eig
Too many input arguments.
what should i do?
  2 Commenti
Star Strider
Star Strider il 20 Mag 2022
In the Symbolic Math Toolbox eig function, there is only one argument.
syms ei l
h=l/4;
k=(2*ei/h^3)*[6 -3*h -6 -3*h; -3*h 2*h^2 3*h h^2; -6 3*h 6 3*h; -3*h h^2 3*h 2*h^2];
m=(1/(30*h))*[36 -3*h -36 -3*h; -3*h 4*h^2 3*h -h^2; -36 3*h 36 3*h; -3*h -h^2 3*h 4*h^2];
% K(1,:)=[];
% K(:,1)=[];
% M(1,:)=[];
% M(:,1)=[];
[v,d]=eig(k)
v = 
d = 
.
Walter Roberson
Walter Roberson il 23 Feb 2023
Right, symbolic eig() does not support generalized eigenvalues.

Accedi per commentare.

Risposte (2)

VBBV
VBBV il 23 Feb 2023
I presume you need to compute the inverse of mass matrix , m, for a 4 x 4 stiffness matrix , before finding the Eigen solution. However, check the equations if they are correct
syms ei l
h=l/4;
k=(2*ei/h^3)*[6 -3*h -6 -3*h; -3*h 2*h^2 3*h h^2; -6 3*h 6 3*h; -3*h h^2 3*h 2*h^2]
k = 
m=(1/(30*h))*[36 -3*h -36 -3*h; -3*h 4*h^2 3*h -h^2; -36 3*h 36 3*h; -3*h -h^2 3*h 4*h^2]
m = 
V = m\k % Take the inverse of matrix m
Warning: Solution is not unique because the system is rank-deficient.
V = 
[v,d]=eig(V) % only one argument
v = 
d = 

Torsten
Torsten il 23 Feb 2023
syms ei l
h=l/4;
k=(2*ei/h^3)*[6 -3*h -6 -3*h; -3*h 2*h^2 3*h h^2; -6 3*h 6 3*h; -3*h h^2 3*h 2*h^2];
m=(1/(30*h))*[36 -3*h -36 -3*h; -3*h 4*h^2 3*h -h^2; -36 3*h 36 3*h; -3*h -h^2 3*h 4*h^2];
k(1,:)=[];
k(:,1)=[];
m(1,:)=[];
m(:,1)=[];
[v,d]=eig(inv(m)*k)
v = 
d = 

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by