While running the code
k=[71284.72 -35642.36 0 0;-35642.36 71284.72 -35642.36 0;0 -35642.36 71284.72 -35642.36;0 0 -35642.36 35642.36];
m=[632.25 0 0 0;0 632.25 0 0;0 0 632.25 0;0 0 0 363.75];
W=Naturalfreq(k,m)
X=zeros(4,4);
for i=1:4
Y=Modeshape1(W(5-i),k,m);
X(:,i)=Y;
plot(X)
end
Function 1
[W] = Naturalfreq(k,m)
syms omega
a = k-(omega*m);
b = det(a);
c = sym2poly(b);
d = roots(c);
W = sqrt(d);
Function 2
[X] = Modeshape1(W,k,m)
omega = W^2;
a = k - (omega*m);
x1 = 1;
x2 = -a(1,1)/a(1,2);
x3 = -(a(2,1)+a(2,2)*x2)/a(2,3);
x4 = -(a(3,2)*x2+a(3,3)*x3)/a(3,4);
X = [x1;x2;x3;x4]
The following error occurs
Undefined function or variable 'Naturalfreq'.
Error in
W=Naturalfreq(k,m)%Function 1
0 Comments
Sign in to comment.