how do I solve symbolic eigenvalue?
23 views (last 30 days)
Show older comments
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 Comments
Star Strider
on 20 May 2022
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)
.
Answers (2)
VBBV
on 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]
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]
V = m\k % Take the inverse of matrix m
[v,d]=eig(V) % only one argument
0 Comments
Torsten
on 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)
0 Comments
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







